aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-10-12 16:32:04 +0200
committerLoïc Hoguin <[email protected]>2015-10-12 16:32:04 +0200
commit42a6fccbce3e42c99471acd327e61bebfd474585 (patch)
tree9349268ed9903e46c40c6fae70c4a940c683ffb4
parent10935c4d6ad7ca9f2c7e5e1f6bac877bfa72ad1d (diff)
downloaderlang.mk-42a6fccbce3e42c99471acd327e61bebfd474585.tar.gz
erlang.mk-42a6fccbce3e42c99471acd327e61bebfd474585.tar.bz2
erlang.mk-42a6fccbce3e42c99471acd327e61bebfd474585.zip
Add a Makefile to build the user guide
-rw-r--r--Makefile12
-rw-r--r--templates/guide_footer.tpl4
-rw-r--r--templates/guide_header.tpl38
3 files changed, 54 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b86f1ba
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,12 @@
+all:
+ rm -rf guide/ master/
+ git clone --depth 1 https://github.com/ninenines/erlang.mk master
+ cd master/ && make docs
+ mkdir guide/
+ for f in master/doc/html/*.html; do \
+ cp templates/guide_header.tpl guide/$${f##*/}; \
+ perl -e '$$/ = undef; $$file = <>; $$file =~ s/.*<body>(.*)<\/body>.*/\1/sg; print $$file;' $$f >> guide/$${f##*/}; \
+ cat templates/guide_footer.tpl >> guide/$${f##*/}; \
+ done
+ rm -rf master/
+ git add guide/ && git commit -m "Update user guide"
diff --git a/templates/guide_footer.tpl b/templates/guide_footer.tpl
new file mode 100644
index 0000000..1a82220
--- /dev/null
+++ b/templates/guide_footer.tpl
@@ -0,0 +1,4 @@
+
+</main>
+</body>
+</html>
diff --git a/templates/guide_header.tpl b/templates/guide_header.tpl
new file mode 100644
index 0000000..5f70fc5
--- /dev/null
+++ b/templates/guide_header.tpl
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<meta charset="utf-8"/>
+<title>Erlang.mk</title>
+<style type="text/css"><!--
+body{background:white;color:black;font-family:"Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;justify-content:center;margin:0 auto;padding:0;width:600px}
+header {align-items:center;display:flex;justify-content:center}
+header nav.left{text-align:right;width:150px}
+header nav.right{text-align:left;width:150px}
+header nav a{display:block;margin:1.5em 1em}
+main{margin-top:2em;text-align:justify}
+main h2, main h3{margin-top:2em}
+a{color:#d9230f;text-decoration:none}
+a:hover{text-decoration:underline}
+h1, h2, h3{font-weight:normal}
+h1 a{color:black}
+h1 a:hover{color:#d9230f;text-decoration:none}
+span.var{color:teal}
+span.op{color:maroon}
+span.dir{color:purple}
+div.navfooter{margin-bottom:1em}
+--></style>
+</head>
+<body>
+<header>
+ <nav class="left">
+ <a href="https://github.com/ninenines/erlang.mk/blob/master/doc/src/guide/book.asciidoc">User guide</a>
+ <a href="https://github.com/ninenines/erlang.mk/blob/master/doc/src/guide/getting_started.asciidoc">Tutorials</a>
+ </nav>
+ <a href="/" class="logo"><img src="../res/logo-small.png" alt="Erlang.mk" title="Erlang.mk: A build tool for Erlang that just works" height="200" width="206"/></a>
+ <nav class="right">
+ <a href="https://github.com/ninenines/erlang.mk/tree/master/index">470+ packages</a>
+ <a href="https://github.com/ninenines/erlang.mk/issues">Issues?</a>
+ </nav>
+</header>
+<main>
+