File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ doc /* .html
2+ ! doc /tpl.html
13_build
24deps /**
35ebin /**
Original file line number Diff line number Diff line change 1+ SOURCE_DOCS := $(wildcard * .md)
2+
3+ EXPORTED_DOCS =\
4+ $(SOURCE_DOCS:.md=.html )
5+
6+ RM =/bin/rm
7+
8+ PANDOC =pandoc
9+
10+ PANDOC_HTML_OPTIONS =--standalone --highlight-style=tango --template tpl.html -f gfm --to html5
11+
12+ % .html : % .md
13+ $(PANDOC ) $(PANDOC_HTML_OPTIONS ) -o $@ $<
14+
15+
16+ .PHONY : all clean
17+
18+ all : $(EXPORTED_DOCS )
19+
20+ clean :
21+ - $(RM ) -f $(EXPORTED_DOCS )
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ cd $( dirname $( realpath $0 ) )
4+
5+ make clean
6+ make
7+
8+ # fix internal doc links
9+ sed -i ' s/https:\/\/github\.com\/doc\/\([a-zA-Z_-]*\)\.md/\1.html/g' * .html
10+ sed -i ' s/\"\([a-zA-Z_-]*\)\.md\([a-zA-Z_-#]*\)\"/\"\1.html\2\"/g' * .html
11+ sed -i ' s/\"doc\/\([a-zA-Z_-]*\)\.md\"/\"\1.html\"/g' * .html
12+ sed -i ' s/\"\([a-zA-Z_-]*\)\.md\"/\"\1.html\"/g' * .html
13+
14+ # fix external doc links
15+ sed -i ' s/maps\.html\#/http:\/\/erlang.org\/doc\/man\/maps\.html#/g' * .html
16+ sed -i ' s/unicode\.html\#/http:\/\/erlang.org\/doc\/man\/unicode\.html#/g' * .html
17+ sed -i ' s/maps\.md\#/http:\/\/erlang.org\/doc\/man\/maps\.html#/g' * .html
18+ sed -i ' s/unicode\.md\#/http:\/\/erlang.org\/doc\/man\/unicode\.html#/g' * .html
19+
20+ # cleans up the indentation of code blocks
21+ sed -i ' s/ <a/<a/g' index.html
You can’t perform that action at this time.
0 commit comments