Skip to content
kishore edited this page Mar 28, 2018 · 3 revisions

Overview

The docs are generated using the a combination of the following:

  1. Example file ( Kotlin code )
  2. Xml comment tags ( in Kotlin code ) to designate sections
  3. A Doc tool ( internally develop app )
  4. Jekyll ( static site generator )

Tags

The examples have xml document tags that serve as place holders for beginning and ending of various sections. These sections are parsed out using the doc tool and a markdown file is generated. The markdown file is is then processed by the static site generator ( Jekyll ) to generate the docs using an html theme

Example

//<doc:import_required>
import slatekit.common.args.Args
import slatekit.common.args.ArgsSchema
//</doc:import_required>

//<doc:import_examples>
import slatekit.core.cmds.Cmd
import slatekit.common.Result
import slatekit.common.results.ResultFuncs.ok
//</doc:import_examples>

// more ...

Steps

step url notes
Add to examples slatekit.examples setup the doc tags
Add to doc tools Doc Entry make sure to setup the fields correctly
generate docs Run API Run project and command generateAll ( refer to file )
Copy files site src Copy generated markdown files to slate kit root ( for jekyll ) folder in gh-pages branch and also to src ( for backup )
Run Jekyll Jekyll Run jekyll in the root gh-pages folder via jekyll build
Copy html - The html files are generated in the _site folder. Copy the html file(s) back into the root folder
Commit - Commit the new / updated html files in the root folder back to git
Clone this wiki locally