html-customization-properties-file.dita 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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
  17. <indexterm>.properties file</indexterm></indexterm>
  18. <indexterm>HTML
  19. <indexterm>build properties</indexterm></indexterm>
  20. <indexterm>CSS
  21. <indexterm>.properties file</indexterm></indexterm>
  22. <indexterm>.properties file</indexterm>
  23. </keywords>
  24. </metadata>
  25. </prolog>
  26. <taskbody>
  27. <steps>
  28. <step>
  29. <cmd>Create a <filepath>.properties</filepath> file to store the parameter settings for your
  30. customization.</cmd>
  31. <info>
  32. <note type="tip">You can use one of the sample <filepath>.properties</filepath> files from the DITA-OT
  33. documentation as a starting point for your own customizations. These files are available in the installation
  34. folder under <filepath>docsrc/samples/properties/</filepath>.</note>
  35. </info>
  36. <stepxmp>
  37. <p>For example:</p>
  38. <fig>
  39. <title>The <filepath>docsrc/samples/properties/sequence-html5.properties</filepath> file</title>
  40. <codeblock outputclass="language-properties normalize-space show-line-numbers show-whitespace"><coderef href="../samples/properties/sequence-html5.properties"/></codeblock>
  41. </fig>
  42. </stepxmp>
  43. </step>
  44. <step>
  45. <cmd>Reference your <filepath>.properties</filepath> file with the <cmdname>dita</cmdname> command when building
  46. your output.</cmd>
  47. <stepxmp>
  48. <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>
  49. </stepxmp>
  50. <info/>
  51. </step>
  52. </steps>
  53. <result>
  54. <note>For an example of HTML output generated using this method, see the HTML5 version of the DITA-OT
  55. documentation included in the installation folder under <filepath>doc/index.html</filepath>.</note>
  56. </result>
  57. </taskbody>
  58. </task>