Skip to content

Commit 752e0f5

Browse files
authored
Merge pull request #57 from tsloughter/3.1.0
version bump to 3.1.0 and additions to docs
2 parents 10752ec + e2d42e2 commit 752e0f5

8 files changed

Lines changed: 861 additions & 1 deletion

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
doc/*.html
2+
!doc/tpl.html
13
_build
24
deps/**
35
ebin/**

doc/Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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)

doc/build.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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

0 commit comments

Comments
 (0)