Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version bump to 3.1.0 and additions to docs #57

Merged
merged 1 commit into from
May 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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