| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <!DOCTYPE html
- SYSTEM "about:legacy-compat">
- <html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="copyright" content="(C) Copyright 2019"><meta name="DC.rights.owner" content="(C) Copyright 2019"><meta name="DC.type" content="task"><meta name="description" content="You can also use a .properties file to reference a set of build parameters when building output with the dita command. The DITA-OT documentation uses a .properties file to include custom CSS, header branding, and table-of-contents navigation in the HTML5 output."><meta name="DC.subject" content="command, dita, .properties file, HTML, build properties, CSS"><meta name="keywords" content="command, dita, .properties file, HTML, build properties, CSS"><meta name="DC.relation" scheme="URI" content="../topics/html-customization.html"><meta name="DC.relation" scheme="URI" content="../topics/html-customization-parameters.html"><meta name="DC.relation" scheme="URI" content="../topics/html-customization-plugins.html"><meta name="DC.format" content="HTML5"><meta name="DC.identifier" content="custom-html-properties-file"><link rel="stylesheet" type="text/css" href="../css/commonltr.css"><link rel="stylesheet" type="text/css" href="../css/dita-ot-doc.css"><title>Customizing HTML with a .properties file</title></head><body id="custom-html-properties-file"><header role="banner"><div class="header">
- <p>DITA Open Toolkit</p>
- <hr>
- </div></header><nav role="toc"><ul><li><a href="../index.html">DITA Open Toolkit 3.3</a></li><li><a href="../release-notes/index.html">Release Notes</a></li><li><a href="../topics/installing-client.html">Installing DITA-OT</a></li><li><a href="../topics/alternative-input-formats.html">Authoring formats</a></li><li><a href="../topics/building-output.html">Building output</a></li><li><a href="../parameters/index.html">Setting parameters</a></li><li><a href="../topics/customizing.html">Customizing DITA-OT</a><ul><li><a href="../topics/html-customization.html">Customizing HTML</a><ul><li><a href="../topics/html-customization-parameters.html">Setting HTML parameters</a></li><li class="active"><a href="../topics/html-customization-properties-file.html">Using a properties file</a></li><li><a href="../topics/html-customization-plugins.html">Custom HTML plug-ins</a></li></ul></li><li><a href="../topics/pdf-customization.html">Customizing PDF</a></li><li><a href="../topics/custom-plugins.html">Working with plug-ins</a></li><li><a href="../extension-points/plugin-extension-points.html">Extension points</a></li><li><a href="../topics/migration.html">Migrating customizations</a></li><li><a href="../topics/globalization.html">Globalizing DITA content</a></li><li><a href="../topics/rebuilding-docs.html">Rebuilding documentation</a></li></ul></li><li><a href="../topics/troubleshooting-overview.html">Troubleshooting</a></li><li><a href="../reference/index.html">Reference</a></li><li><a href="../topics/dita-and-dita-ot-resources.html">Resources</a></li></ul></nav><main role="main"><article role="article" aria-labelledby="ariaid-title1">
- <h1 class="title topictitle1" id="ariaid-title1">Customizing HTML with a <span class="ph filepath">.properties</span> file</h1>
-
-
-
- <div class="body taskbody"><p class="shortdesc">You can also use a <span class="ph filepath">.properties</span> file to reference a set of build parameters when
- building output with the <span class="keyword cmdname">dita</span> command. The DITA-OT documentation uses a
- <span class="ph filepath">.properties</span> file to include custom CSS, header branding, and table-of-contents navigation in
- the HTML5 output.</p>
- <section><div class="tasklabel"><h2 class="sectiontitle tasklabel">Procedure</h2></div><ol class="ol steps"><li class="li step stepexpand">
- <span class="ph cmd">Create a <span class="ph filepath">.properties</span> file to store the parameter settings for your
- customization.</span>
- <div class="itemgroup info">
- <div class="note tip note_tip"><span class="note__title">Tip:</span> You can use the <span class="ph filepath">.properties</span> for the DITA-OT documentation as a starting
- point for your own customizations. This file is available in the installation folder under
- <span class="ph filepath">docsrc/samples/properties/docs-build-html5.properties</span>.</div>
- </div>
- <div class="itemgroup stepxmp">
- <p class="p">For example:</p>
- <figure class="fig fignone"><figcaption><span class="fig--title-label">Figure 1. </span>The <span class="ph filepath">docsrc/samples/properties/docs-build-html5.properties</span> file</figcaption>
-
- <pre class="pre codeblock language-properties normalize-space show-line-numbers show-whitespace"><code># Copy the custom .css file to the output directory:
- args.copycss = yes
- # Custom .css file used to style output:
- args.css = dita-ot-doc.css
- # Location of the copied .css file relative to the output:
- args.csspath = css
- # Directory that contains the custom .css file:
- args.cssroot = resources
- # Generate headings for sections within task topics:
- args.gen.task.lbl = YES
- # File that contains the running header content:
- args.hdr = ${basedir}/resources/header.xml
- # Base name of the Table of Contents file:
- args.html5.toc = toc
- # Generate a partial navigation TOC in topic pages:
- nav-toc = partial
- # Stop processing if there are any errors:
- processing-mode = strict</code></pre>
- </figure>
- </div>
- </li><li class="li step stepexpand">
- <span class="ph cmd">Reference your <span class="ph filepath">.properties</span> file with the <span class="keyword cmdname">dita</span> command when building
- your output.</span>
- <div class="itemgroup stepxmp">
- <pre class="pre codeblock"><code><span class="keyword cmdname">dita</span> <span class="keyword parmname">--input</span>=<var class="keyword varname">my.ditamap</var> <span class="keyword parmname">--format</span>=<span class="keyword option">html5</span> <span class="keyword parmname">--propertyfile</span>=<var class="keyword varname">my.properties</var></code></pre>
- </div>
- <div class="itemgroup info"></div>
- </li></ol></section>
- <section class="section result"><div class="tasklabel"><h2 class="sectiontitle tasklabel">Results</h2></div>
- <div class="note note note_note"><span class="note__title">Note:</span> For an example of HTML output generated using this method, see the HTML5 version of the DITA-OT
- documentation included in the installation folder under <span class="ph filepath">doc/index.html</span>.</div>
- </section>
- </div>
- <nav role="navigation" class="related-links"><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/html-customization.html" title="You can adjust the look and feel of your HTML output without creating a DITA-OT plug-in by including custom CSS, headers and footers, or table-of-contents navigation in topics.">Customizing HTML output</a></div></div><div class="linklist relinfo relconcepts"><strong>Related concepts</strong><br><ul class="linklist"><li class="linklist"><a class="link" href="../topics/html-customization-plugins.html" title="For more complex customizations, you can create custom DITA-OT plug-ins that bundle custom fonts, JavaScript, and stylesheets; modify the HTML markup, or override other aspects of HTML processing.">Custom HTML plug-ins</a></li></ul></div><div class="linklist relinfo reltasks"><strong>Related tasks</strong><br><ul class="linklist"><li class="linklist"><a class="link" href="../topics/html-customization-parameters.html" title="For simple branded HTML pages, you can adjust the look and feel of the default output to match your company style by setting parameters to include custom CSS, header branding, or table-of-contents navigation in topics. (These changes do not require a custom plug-in.)">Setting parameters for custom HTML</a></li></ul></div></nav></article></main></body></html>
|