Single Markdown File

To reuse Markdown in several places without duplication, use the include-markdown plugin. # Included Markdown This markdown, and the sub-heading above, were included using the `include-markdown` plugin. :include-markdown: markdown-dir/md-to-include.md This markdown, and the sub-heading above, were included using the include-markdown plugin.

Optional Markdown

When you document an open source project you may have different instructions based on where the documentation is deployed.For example, this documentation has two versions, one deployed internally at Two Sigma and one deployed externally using GitHub Pages. Most of the documentation parts are the same, but there are differences in sections like Getting Started.We build documentation twice and the differences are handled by include-markdown 's firstAvailable parameter. :include-markdown: {firstAvailable: [ "markdown-dir/getting-started-step-internal.md", "markdown-dir/getting-started-step-external.md"]} command specific-to-external

Partial Markdown

Use surroundedBy to include portion of a markdown from existing markdown file, e.g. readme.md Given an existing markdown files with markers # Section One Some text # Section Two [comment]: <> (marker-one) Use these parameters to setup your work environment: ``` parameter=value ``` [comment]: <> (marker-one) markdown :include-markdown: markdown-dir/markdown-with-markers.md {surroundedBy: "<> (marker-one)"} Use these parameters to setup your work environment: parameter=value

Inlined Markdown

To inline a piece of markdown use the inlined version of the plugin content `:markdown: path-to-file.md` content Plugin will inline text content into current paragraph. markdown Use the latest version `:markdown: markdown-dir/inlined.md` to get the feature. `:badge: 2.34` Use the latest version to get the feature.Use firstAvailable parameter to include first file that can be resolved markdown Use the latest version `:markdown: { firstAvailable: ["markdown-dir/inlined-alternative.md", "markdown-dir/inlined.md"]}` to get the feature. `:badge: 2.44_internal` `:badge: 2.34` Use the latest version to get the feature.

Multiple Markdown Files

You can also include all the Markdown files within a directory by using include-markdowns .This plugin can be used to generate release notes or an FAQ page. ### How to install Znai? To install Znai use ```cli brew install testingisdocumenting/brew/znai ``` ### How to run preview mode? To run Znai in preview mode ```cli znai --preview ``` :include-markdowns: faq-collection {sort: "ascending"} How to install Znai? To install Znai use brew install testingisdocumenting/brew/znai How to run preview mode? To run Znai in preview mode znai --preview Note: include-markdowns renders files of the specified directory based on the filename (by default in descending alphabetical order).