petek, 3. april 2015

Generate HTML from Markdown files (gitlab wiki export)

How to generate HTML pages from .markdown files as exported from Gitlab .wiki repo? Easily:

$ sudo pip install grip 
$ files=`ls *.markdown` 
$ for f in $files; do grip $f --export; done 

And now, find all those "a hrefs" and add .html after the links in order you can browse the files with your favourite browser (help yourself with some scripts) :)