code-srv-test/dita-ot-3.6/doc/parameters/generate-copy-outer.html
2021-03-23 22:38:58 +00:00

72 lines
No EOL
7.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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="By default, DITA-OT assumes content is located in or beneath the directory containing the DITA map file. The generate.copy.outer parameter can be used to adjust how output is generated for content that is located outside the map directory."><meta name="keywords" content=", generate.copy.outer, HTML, files outside map directory, DITA maps, relative file locations"><link rel="stylesheet" type="text/css" href="../css/commonltr.css"><link rel="stylesheet" type="text/css" href="../css/dita-ot-doc.css"><title>Handling content outside the map directory</title></head><body id="ID"><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><ul><li><a href="../topics/html-customization-navigation.html">Adding navigation</a></li><li><a href="../topics/html-customization-css.html">Adding custom CSS</a></li><li><a href="../topics/html-customization-header.html">Headers and footers</a></li><li class="active"><a href="../parameters/generate-copy-outer.html">Handling content outside the map directory</a></li></ul></li><li><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">Handling content outside the map directory</h1>
<div class="body conbody"><p class="shortdesc">By default, DITA-OT assumes content is located in or beneath the directory containing the DITA map file.
The <span class="keyword parmname">generate.copy.outer</span> parameter can be used to adjust how output is generated for content
that is located outside the map directory.</p>
<section class="section"><h2 class="title sectiontitle">Background</h2>
<div class="p">This is an issue in the following situations:
<ul class="ul">
<li class="li">The DITA map is in a directory that is a peer to directories that contain referenced objects.</li>
<li class="li">The DITA map is in a directory that is below the directories that contain the referenced objects.</li>
</ul></div>
<p class="p">Lets assume that the directory structure for the DITA content looks like the following:</p>
<div class="p"><pre class="pre">images/
fig.png
maps/
start.ditamap
topics/
topic.dita</pre></div>
<p class="p">The DITA map is in the <span class="ph filepath">maps</span> directory, the topics are in the <span class="ph filepath">topics</span>
directory, and the images are in the <span class="ph filepath">images</span> directory.</p>
</section>
<section class="section"><h2 class="title sectiontitle">Exclude content outside the map directory</h2>
<p class="p">Lets assume that you run the HTML5 transformation. By default, DITA-OT uses the
<span class="keyword parmname">generate.copy.outer</span> parameter with a value of <span class="keyword option">1</span>, which means that no
output is generated for content that is located outside the DITA map directory.</p>
<p class="p">You receive only the following output:</p>
<div class="p"><pre class="pre">index.html
commonltr.css
commonrtl.css</pre></div>
<p class="p">The <span class="ph filepath">index.html</span> file contains the navigation structure, but all the links are broken, since
no HTML files were built for the topics.</p>
<p class="p">How do you fix this? By adjusting the parameter setting to shift the output directory.</p>
</section>
<section class="section"><h2 class="title sectiontitle">Shift the output directory to include all content</h2>
<p class="p">To preserve the links to referenced topics and images and make it easier to copy the output directory, set the
<span class="keyword parmname">generate.copy.outer</span> parameter to <span class="keyword option">3</span>.</p>
<p class="p">Now your output directory structure resembles the structure of the source directory:</p>
<div class="p"><pre class="pre">images/
fig.png
maps/
index.html
topics/
topic.html
commonltr.css
commonrtl.css</pre></div>
<p class="p">The <span class="ph filepath">index.html</span> file is in the <span class="ph filepath">maps</span> directory, the HTML files for the
topics are in the <span class="ph filepath">topics</span> directory, and the referenced images are in the
<span class="ph filepath">images</span> directory.</p>
<div class="note tip note_tip"><span class="note__title">Tip:</span> If <span class="keyword parmname">args.csspath</span> is not set, the default CSS files (and any custom CSS files
specified via <span class="keyword parmname">args.css</span>) will be copied to the root level of the output folder. To copy CSS
files to an output subfolder named <span class="ph filepath">css</span>, set <span class="keyword parmname">args.csspath</span> to
<span class="keyword option">css</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-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></div></div><div class="linklist reltasks"><strong>Related tasks</strong><br><ul class="linklist"><li class="linklist"><a class="link" href="../topics/html-customization-navigation.html" title="In HTML5 output, you can set a parameter to include table-of-contents navigation in the nav element of each page. The navigation can be rendered in a sidebar or menu via CSS.">Adding navigation to topics</a></li><li class="linklist"><a class="link" href="../topics/html-customization-css.html" title="To modify the appearance of the default HTML output that DITA Open Toolkit generates, you can reference a custom Cascading Style Sheet (CSS) file with the typography, colors, and other presentation aspects that define your corporate identity.">Adding custom CSS</a></li><li class="linklist"><a class="link" href="../topics/html-customization-header.html" title="You add a custom header to include a publication title, company logo, or other common branding elements in HTML output. A custom footer can also be added with copyright information, legal boilerplate, or other fine print.">Adding custom headers and footers</a></li></ul></div></nav></article></main></body></html>