| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
- <!-- This file is part of the DITA Open Toolkit project. See the accompanying LICENSE file for applicable license. -->
- <topic id="markdown">
- <title>Markdown</title>
- <shortdesc>Along with Markdown input, DITA-OT now provides three new transformation types to convert DITA content to
- Markdown, including the original syntax, GitHub-Flavored Markdown, and GitBook.</shortdesc>
- <prolog>
- <metadata>
- <keywords>
- <indexterm>Markdown</indexterm>
- <indexterm>transformations<indexterm>Markdown</indexterm></indexterm>
- <indexterm>GitHub-Flavored Markdown</indexterm>
- <indexterm>GitBook</indexterm>
- <indexterm>plug-ins<indexterm>dita2markdown</indexterm></indexterm>
- <indexterm>dita2markdown</indexterm>
- <indexterm>table of contents<indexterm>Markdown</indexterm></indexterm>
- </keywords>
- </metadata>
- </prolog>
- <body>
- <p>The new output formats can be used to feed DITA content into Markdown-based publishing systems or other workflows
- that lack the ability to process DITA XML.</p>
- <section id="generating-markdown-output">
- <title>Generating Markdown output</title>
- <p>Markdown output can be generated by passing one of the following transformation types to the dita command with
- the <parmname>--format</parmname> option:</p>
- <ul>
- <li>
- <p>To publish Markdown DITA files, use the <option>markdown</option> transtype.</p></li>
- <li>
- <p>To generate
- <xref keyref="gfm-spec"/> files, use the <option>markdown_github</option> transtype.</p></li>
- <li>
- <p>To publish GitHub-Flavored Markdown and generate a <filepath>SUMMARY.md</filepath> table of contents file
- for publication via
- <xref format="html" href="https://www.gitbook.com" scope="external">GitBook</xref>, use the
- <option>markdown_gitbook</option> transtype.</p></li>
- </ul>
- <p>Run the <cmdname>dita</cmdname> command and set the value of the output <parmname>--format</parmname> option to
- the desired format, for example:</p>
- <codeblock><filepath conref="../resources/conref-task.dita#ID/dita-cmd"/> <parmname>--input</parmname>=<varname>input-file</varname> <parmname>--format</parmname>=<option>markdown</option></codeblock>
- <p>where:</p>
- <ul>
- <li conref="../resources/conref-task.dita#ID/novice-variables-1"
- conrefend="../resources/conref-task.dita#ID/novice-variables-2"/>
- </ul></section>
- </body>
- </topic>
|