/
project-files-json.dita
47 lines (47 loc) · 2.6 KB
/
project-files-json.dita
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<!-- This file is part of the DITA Open Toolkit project. See the accompanying LICENSE file for applicable license. -->
<concept id="ID">
<title>Sample JSON project files</title>
<titlealts>
<navtitle>JSON project files</navtitle>
</titlealts>
<shortdesc>DITA-OT includes sample project files in
<xref keyref="json"/> format that can be used to define a publication project. Like the XML project samples, the
sample JSON files illustrate how deliverables can be described for use in publication projects. The JSON samples are
functionally equivalent to their XML and YAML counterparts, with minor adaptations to JSON file syntax.</shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm>JSON project files</indexterm>
<indexterm>project files
<indexterm>JSON</indexterm></indexterm>
</keywords>
</metadata>
</prolog>
<conbody>
<p>Project files can be designed in a modular fashion to create reusable configuration structures that allow you to
define settings in one file and refer to them in other projects to publish multiple deliverables at once.</p>
<p>For example, <filepath conkeyref="conref-task/samples-dir"/><filepath>/project-files/html.json</filepath> defines
a single HTML deliverable.</p>
<fig>
<title>Sample project file for HTML output</title>
<codeblock outputclass="language-json normalize-space show-line-numbers show-whitespace"><coderef
href="../samples/project-files/html.json"
/></codeblock>
</fig>
<p>This file can be used to generate the HTML version of the DITA-OT documentation by running the following command
from the <filepath>docsrc</filepath> folder of the DITA-OT installation directory:</p>
<codeblock outputclass="syntax-bash"><cmdname>dita</cmdname> <parmname>--project</parmname>=<varname
>samples/project-files/html.json</varname></codeblock>
<p>The project file for HTML output imports the common <codeph>html</codeph> context from a shared project context
defined in the <filepath conkeyref="conref-task/samples-dir"/><filepath>/project-files/common.json</filepath>
file, which includes the input map file and the DITAVAL file used to filter the output.</p>
<fig>
<title>Sample shared context for HTML-based output</title>
<codeblock outputclass="language-json normalize-space show-line-numbers show-whitespace"><coderef
href="../samples/project-files/common.json"
/></codeblock>
</fig>
</conbody>
</concept>