html-customization-properties-file.dita 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
  3. <!-- This file is part of the DITA Open Toolkit project. See the accompanying LICENSE file for applicable license. -->
  4. <task id="custom-html-properties-file">
  5. <title>Customizing HTML with a <filepath>.properties</filepath> file</title>
  6. <titlealts>
  7. <navtitle>Using a properties file</navtitle>
  8. </titlealts>
  9. <shortdesc>You can also use a <filepath>.properties</filepath> file to reference a set of build parameters when
  10. building output with the <cmdname>dita</cmdname> command. The DITA-OT documentation uses a
  11. <filepath>.properties</filepath> file to include custom CSS, header branding, and table-of-contents navigation in
  12. the HTML5 output.</shortdesc>
  13. <prolog>
  14. <metadata>
  15. <keywords>
  16. <indexterm><cmdname>dita</cmdname> command<indexterm>.properties file</indexterm></indexterm>
  17. <indexterm>HTML<indexterm>build properties</indexterm></indexterm>
  18. <indexterm>CSS<indexterm>.properties file</indexterm></indexterm>
  19. <indexterm>.properties file</indexterm>
  20. </keywords>
  21. </metadata>
  22. </prolog>
  23. <taskbody>
  24. <steps>
  25. <step>
  26. <cmd>Create a <filepath>.properties</filepath> file to store the parameter settings for your
  27. customization.</cmd>
  28. <info>
  29. <note type="tip">You can use the <filepath>.properties</filepath> for the DITA-OT documentation as a starting
  30. point for your own customizations. This file is available in the installation folder under
  31. <filepath>docsrc/samples/properties/docs-build-html5.properties</filepath>.</note>
  32. </info>
  33. <stepxmp>
  34. <p>For example:</p>
  35. <fig>
  36. <title>The <filepath>docsrc/samples/properties/docs-build-html5.properties</filepath> file</title>
  37. <codeblock outputclass="language-properties normalize-space show-line-numbers show-whitespace"><coderef href="../samples/properties/docs-build-html5.properties"/></codeblock>
  38. </fig>
  39. </stepxmp>
  40. </step>
  41. <step>
  42. <cmd>Reference your <filepath>.properties</filepath> file with the <cmdname>dita</cmdname> command when building
  43. your output.</cmd>
  44. <stepxmp>
  45. <codeblock><cmdname>dita</cmdname> <parmname>--input</parmname>=<varname>my.ditamap</varname> <parmname>--format</parmname>=<option>html5</option> <parmname>--propertyfile</parmname>=<varname>my.properties</varname></codeblock>
  46. </stepxmp>
  47. <info/>
  48. </step>
  49. </steps>
  50. <result>
  51. <note>For an example of HTML output generated using this method, see the HTML5 version of the DITA-OT
  52. documentation included in the installation folder under <filepath>doc/index.html</filepath>.</note>
  53. </result>
  54. </taskbody>
  55. </task>