Experiments with documentation as code
Find a file
2025-09-27 18:41:35 +02:00
markdown Adding CSS to dynamic Markdown 2025-06-29 22:34:02 +02:00
mermaid Refactor Markdown 2025-06-29 21:16:21 +02:00
plantuml Cleanup 2025-09-27 17:03:58 +02:00
.gitignore Integrate markdown stuff 2025-05-28 23:08:29 +02:00
index.html Refactor Markdown 2025-06-29 21:16:21 +02:00
LICENSE Play with PlantUML 2025-05-18 00:19:42 +02:00
README.md Cleanup 2025-09-27 18:41:35 +02:00

sample-documentation

Experiments with documentation as code

$ nginx-start $(pwd) 8080

See: http://localhost:8080/

Markdown

Links:

$ npm install -g marked
$ marked --help

$ npm install -g remark-cli remark-html remark-gfm
$ remark --help

$ npm install -g showdown
$ showdown --help
$ make clean && make all

See:

Marked

Marked is a Javascript Markdown to HTML converter. It supports CommonMark and GFM. It can be used client side (in the browser), server side (with NodeJS) or from a command line interface (CLI). Marked does not sanitize the output HTML (but DOMPurify can be used for that).

Remark

Remark is a Javascript Markdown to HTML converter. It can generate and reformat Markdown and is powered by plugins to do all kinds of things: check Markdown code style, transform safely to React, add a table of contents, or compile to man pages.

Limitations: collapsed sections (remark-collapse does not do the job)

Showdown.js

Showdownjs is a Javascript Markdown to HTML converter. It can be used client side (in the browser) or server side (with NodeJS).

Limitations: line break by backslash, striketrough, nested lists, numbered lists using 1), tables

Mermaid

Links:

$ npm install -g @mermaid-js/mermaid-cli
$ mmdc --version
$ mmdc --help
$ make clean && make all

See:

PlantUML

Links:

$ mvn clean verify
$ PLANTUML=~/.m2/repository/net/sourceforge/plantuml/plantuml/1.2025.2/plantuml-1.2025.2.jar
$ java -jar $PLANTUML -version
$ java -jar $PLANTUML -help
$ java -jar $PLANTUML -tpng -o output/png src/docs/
$ java -jar $PLANTUML -tsvg -o output/svg src/docs/

See: Diagrams

IDEs

Visual Studio Code

Markdown:

  • built-in, also supports many GitHub features such as tables
  • press Ctrl+Shift+V or Ctrl+K V for preview

Mermaid:

  • Install the extension "Mermaid Preview" from Vlad Stirbu (vstirbu/vscode-mermaid-preview)
  • Open the view "Mermaid preview: Preview diagram"
  • There's no need to login in order to preview Mermaid diagrams

PlantUML:

  • Install the extension "PlantUML" from jebbs (jebbs.plantuml)
  • Open the view "PlantUML Preview Current Diagram"

Eclipse

Markdown:

  • built-in, but limited support

PlantUML:

  • Install the plugin "PlantUML" of the Norwegian Univ. of Science and Tech
  • Open the view "PlantUML"