57 lines
No EOL
6.4 KiB
HTML
57 lines
No EOL
6.4 KiB
HTML
<!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 2020"><meta name="generator" content="DITA-OT"><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="keywords" content="command, dita, .properties file, HTML, build properties, CSS"><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.6</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/building-output.html">Building output</a></li><li><a href="../topics/input-formats.html">Authoring formats</a></li><li><a href="../topics/output-formats.html">Output formats</a></li><li><a href="../parameters/index.html">Parameters</a></li><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></ul></li><li><a href="../topics/pdf-customization.html">Customizing PDF</a></li><li><a href="../topics/adding-plugins.html">Adding plug-ins</a></li><li><a href="../topics/custom-plugins.html">Creating plug-ins</a></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 one of the sample <span class="ph filepath">.properties</span> files from the DITA-OT
|
|
documentation as a starting point for your own customizations. These files are available in the installation
|
|
folder under <span class="ph filepath">docsrc/samples/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/sequence-html5.properties</span> file</figcaption>
|
|
|
|
<pre class="pre codeblock language-properties normalize-space show-line-numbers show-whitespace"><code># Directory that contains the custom .css file:
|
|
args.cssroot = ${args.input.dir}/css/
|
|
|
|
# Custom .css file used to style output:
|
|
args.css = style.css
|
|
|
|
# Copy the custom .css file to the output directory:
|
|
args.copycss = yes
|
|
|
|
# Location of the copied .css file relative to the output:
|
|
args.csspath = branding
|
|
|
|
# Generate a full navigation TOC in topic pages:
|
|
nav-toc = full</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 syntax-bash"><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 modify the look and feel of your HTML output by changing parameter settings to include custom CSS, headers and footers, or table-of-contents navigation in topics.">Customizing HTML output</a></div></div><div class="linklist 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> |