Command Line Tool

Znai comes with a command line tool that:Generates a documentation websiteRuns auto-preview on a local serverRuns documentation server

Markdown

The fastest way to learn Markdown is to go to http://commonmark.org/help/ CommonMark website and go through a 60 second cheatsheet or 10 minute tutorial.

Installation

Download and unzip https://repo.maven.apache.org/maven2/org/testingisdocumenting/znai/znai-dist/1.45.1/znai-dist-1.45.1-znai.zip znai. Add it to your PATH . Note: https://brew.sh/ brew support is currently in progress.

Scaffolding

To create a minimum set of files for your documentation execute znai --new znai |--chapter-one |--page-one.md |--page-two.md |--chapter-two |--page-three.md |--page-four.md |--toc |--lookup-paths |--meta.json Use the znai-maven-plugin https://maven.apache.org/ Maven plugin to scaffold docs in Maven project. <plugin> <groupId>org.testingisdocumenting.znai</groupId> <artifactId>znai-maven-plugin</artifactId> <version>1.45.1</version> </plugin> mvn znai:new

Preview

Navigate to the newly created directory. Start preview mode by running: znai --preview [--port port-number] Or using Maven: mvn znai:preview The command will output a URL that directs to your preview.Blue eye icon in the top right corner indicates that preview is on. Open any text editor, modify and save page-one.md file. Changes will be reflected in the browser. The default port number is 3333.

Deploy

See deployment/static-content deployment strategy