Skip to content

Commit

Permalink
Merge pull request #57 from tsloughter/3.1.0
Browse files Browse the repository at this point in the history
version bump to 3.1.0 and additions to docs
  • Loading branch information
tsloughter authored May 7, 2018
2 parents 10752ec + e2d42e2 commit 752e0f5
Show file tree
Hide file tree
Showing 8 changed files with 861 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
doc/*.html
!doc/tpl.html
_build
deps/**
ebin/**
Expand Down
21 changes: 21 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
SOURCE_DOCS := $(wildcard *.md)

EXPORTED_DOCS=\
$(SOURCE_DOCS:.md=.html)

RM=/bin/rm

PANDOC=pandoc

PANDOC_HTML_OPTIONS=--standalone --highlight-style=tango --template tpl.html -f gfm --to html5

%.html : %.md
$(PANDOC) $(PANDOC_HTML_OPTIONS) -o $@ $<


.PHONY: all clean

all : $(EXPORTED_DOCS)

clean:
- $(RM) -f $(EXPORTED_DOCS)
21 changes: 21 additions & 0 deletions doc/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

cd $(dirname $(realpath $0))

make clean
make

# fix internal doc links
sed -i 's/https:\/\/github\.com\/doc\/\([a-zA-Z_-]*\)\.md/\1.html/g' *.html
sed -i 's/\"\([a-zA-Z_-]*\)\.md\([a-zA-Z_-#]*\)\"/\"\1.html\2\"/g' *.html
sed -i 's/\"doc\/\([a-zA-Z_-]*\)\.md\"/\"\1.html\"/g' *.html
sed -i 's/\"\([a-zA-Z_-]*\)\.md\"/\"\1.html\"/g' *.html

# fix external doc links
sed -i 's/maps\.html\#/http:\/\/erlang.org\/doc\/man\/maps\.html#/g' *.html
sed -i 's/unicode\.html\#/http:\/\/erlang.org\/doc\/man\/unicode\.html#/g' *.html
sed -i 's/maps\.md\#/http:\/\/erlang.org\/doc\/man\/maps\.html#/g' *.html
sed -i 's/unicode\.md\#/http:\/\/erlang.org\/doc\/man\/unicode\.html#/g' *.html

# cleans up the indentation of code blocks
sed -i 's/ <a/<a/g' index.html
Loading

0 comments on commit 752e0f5

Please sign in to comment.