Skip to content

alfa-laboratory/kgen-doc-tools

Repository files navigation

kgen-doc-tools

travis build codecov MIT Licence

Project contains utils to generate html documentation from markdown text with custom extensions (like include, title etc.)

Structure:

  • common_nodes - contains parser nodes
  • common_parser - contains common markdown parser implementation with custom extensions like include, title etc
  • files - contains input files, example layout and output directory contains css and js static files
  • jvm_html_render - collect post processors and render implementation to render parsed nodes to html using layout from input folder
  • jvm_server - simple server to demonstrate possibilities with live parser reloading and editing text in web
  • jvm_parser - JVM realization of common_parser
  • js_parser - JS realization of common_parser (with translated TypeScript declaration of NodeJs to Kotlin)

Build requirements:

  • installed java 8
  • installed node 10

Build:

Build project:

./gradlew buildWithResources

And run after with next command:

java -jar jvm_server/build/libs/jvm_server-all.jar <path_to_files>

Where <path_to_files> is path to files directory with layout. If directory is empty, then it will be created with needed structure.

Development run:

  • run client side with webpack in dev mode:
cd jvm_server/public 
npm i 
npm run devNoServer
  • run jvm_server in test mode:
./gradlew buildWithResources
cd jvm_server
java -jar build/libs/jvm_server-all.jar <path_to_files> test
  • open page http://localhost:8080