To reuse Markdown in several places without duplication, use the plugin. This markdown, and the sub-heading above, were included using the plugin. include-markdown include-markdown # Included Markdown This markdown, and the sub-heading above, were included using the `include-markdown` plugin. :include-markdown: markdown-dir/md-to-include.md
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 's parameter. command specific-to-external include-markdown firstAvailable :include-markdown: {firstAvailable: [ "markdown-dir/getting-started-step-internal.md", "markdown-dir/getting-started-step-external.md"]}
Use to include portion of a markdown from existing markdown file, e.g. Given an existing markdown files with markers Use these parameters to setup your work environment: parameter=value surroundedBy readme.md # Section One Some text # Section Two [comment]: <> (marker-one) Use these parameters to setup your work environment: ``` parameter=value ``` [comment]: <> (marker-one) :include-markdown: markdown-dir/markdown-with-markers.md {surroundedBy: "<> (marker-one)"}
To inline a piece of markdown use the inlined version of the plugin Plugin will inline text content into current paragraph. Use the latest version to get the feature. Use parameter to include first file that can be resolved `:badge: 2.44_internal` `:badge: 2.34` Use the latest version to get the feature. content `:markdown: path-to-file.md` content Use the latest version `:markdown: markdown-dir/inlined.md` to get the feature. `:badge: 2.34` firstAvailable Use the latest version `:markdown: { firstAvailable: ["markdown-dir/inlined-alternative.md", "markdown-dir/inlined.md"]}` to get the feature.
You can also include all the Markdown files within a directory by using . This plugin can be used to generate release notes or an FAQ page. 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: renders files of the specified directory based on the filename (by default in descending alphabetical order). include-markdowns ### 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"} include-markdowns