For create beautiful documentation from your wiki or your documentation in repository. Your may be use multiply repositories wiki for create one portal with documentation.
We may be use beautiful templates for generate documentation or added your custom template.
You do not need anything except to git, because md2html created in golang and compile to binary
We may be use installation from binary or with docker
wget https://github.com/cnam/md2html/releases/download/0.2.0/darwin_md2html
mv darwin_md2html /usr/local/bin/md2html
chmod +x /usr/local/bin/md2html
wget https://github.com/cnam/md2html/releases/download/0.2.0/linux_md2html
mv linux_md2html /usr/local/bin/md2html
chmod +x /usr/local/bin/md2html
We assume that you have already installed Docker
docker pull cnam/md2html:latest
docker run -v wiki.dir:wiki.dir \
-v documentation:documentation \
-v template_dir:template_dir \
cnam/md2html:latest -i wiki.dir -o documentation -t template_dir/template.tpl -p /docs
md2html -i wiki.dir -o documentation -t template.tpl -p /docs
WHERE:
Your must be create html template with variables example
Default Variables
<ul>
<li><a href="/docs">Home</a></li>
{{range .Items}}
<li><a href="/{{ .Url}}">{{ .Title}}</a></li>
{{end}}
</ul>
<div id="sidebar">
{{ .Sidebar }}
</div>
{{if.Sidebar}}
{{ .Sidebar}}
{{else}}
<ul>
<li><a href="/docs">Home</a></li>
{{range .Items}}
<li><a href="/{{ .Url}}">{{ .Title}}</a></li>
{{end}}
{{end}}
</ul>
{{end}}
In order to make your sidebar in each sub-directory, he can be your own or a common, if it is set within a directory in the root of the documentation.
Sidebar represents as _Sidebar.md file and allow markdown syntax
Content type
Image
Digest
sha256:20c36d177…
Size
1.2 MB
Last updated
almost 11 years ago
docker pull cnam/md2html