commit 77e9b17a36f704b6714b3ad28abac6a430cffc85 Author: Fengda HUANG Date: Sun Mar 8 22:40:01 2015 +0800 add boilerplate diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..00d65a2 --- /dev/null +++ b/Makefile @@ -0,0 +1,53 @@ +include_dir=build +source=chapters/*.md +title='Github 漫游指南' +filename='github-roam' + + +all: html epub rtf pdf mobi + +markdown: + awk 'FNR==1{print ""}{print}' $(source) > $(filename).md + +html: markdown + pandoc -s $(filename).md -t html5 -o index.html -c style.css \ + --include-in-header $(include_dir)/head.html \ + --include-before-body $(include_dir)/author.html \ + --include-before-body $(include_dir)/share.html \ + --include-after-body $(include_dir)/stats.html \ + --title-prefix $(title) \ + --normalize \ + --smart \ + --toc + +epub: markdown + pandoc -s $(filename).md --normalize --smart -t epub -o $(filename).epub \ + --epub-metadata $(include_dir)/metadata.xml \ + --epub-stylesheet epub.css \ + --epub-cover-image img/cover.jpg \ + --title-prefix $(title) \ + --normalize \ + --smart \ + --toc + +rtf: markdown + pandoc -s $(filename).md -o $(filename).rtf \ + --title-prefix $(title) \ + --normalize \ + --smart + +pdf: markdown + # You need `pdflatex` + # OS X: http://www.tug.org/mactex/ + # Then find its path: find /usr/ -name "pdflatex" + # Then symlink it: ln -s /path/to/pdflatex /usr/local/bin + pandoc -s $(filename).md -o $(filename).pdf \ + --title-prefix $(title) \ + --normalize \ + --smart \ + --toc \ + --latex-engine=`which xelatex` + +# mobi: epub + # Symlink bin: ln -s /path/to/kindlegen /usr/local/bin + # kindlegen $(filename).epub \ No newline at end of file diff --git a/build/author.html b/build/author.html new file mode 100644 index 0000000..b6ccbef --- /dev/null +++ b/build/author.html @@ -0,0 +1,5 @@ + +

+

Github Roam

+

By Phodal Huang(Geek's Life)

+

\ No newline at end of file diff --git a/build/head.html b/build/head.html new file mode 100644 index 0000000..af6b2f6 --- /dev/null +++ b/build/head.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/build/metadata.xml b/build/metadata.xml new file mode 100644 index 0000000..ac875a6 --- /dev/null +++ b/build/metadata.xml @@ -0,0 +1,4 @@ +Github 漫游指南 +Phodal +Creative Commons Attribution Non-Commercial Share Alike 3.0 +zh-CN \ No newline at end of file diff --git a/build/share.html b/build/share.html new file mode 100644 index 0000000..a1099e9 --- /dev/null +++ b/build/share.html @@ -0,0 +1,5 @@ +
+ + +
\ No newline at end of file diff --git a/build/stats.html b/build/stats.html new file mode 100644 index 0000000..e69de29 diff --git a/build/title.txt b/build/title.txt new file mode 100644 index 0000000..5004794 --- /dev/null +++ b/build/title.txt @@ -0,0 +1,2 @@ +% Github 漫游指南 +% Phodal Huang \ No newline at end of file diff --git a/chapters/00-prelude.md b/chapters/00-prelude.md new file mode 100644 index 0000000..e69de29 diff --git a/chapters/01-introduction.md b/chapters/01-introduction.md new file mode 100644 index 0000000..e69de29 diff --git a/epub.css b/epub.css new file mode 100644 index 0000000..e5a8ac2 --- /dev/null +++ b/epub.css @@ -0,0 +1,157 @@ +html, body, div, span, +h1, h2, h3, h4, h5, h6, +p, a, em, strong, b, u, i, pre, code, del, strike, +abbr, acronym, address, q, cite, blockquote, +big, small, sub, sup, tt, var, center, +img, dfn, ins, kbd, s, samp, +dl, dt, dd, ol, ul, li, +fieldset, legend, label, +table, caption, tbody, tfoot, thead, tr, th, td +{ + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-size: 100%; + vertical-align: baseline; + background: transparent; +} + +@page { + margin: 5px; +} + +p { + margin-bottom: 9px; + line-height: 1.4; +} + +a { + color: #0069d6; +} + + a:hover { + color: #0050a3; + text-decoration: none; + } + + a img { + border: none; + } + +h1, +h2, +h3, +h4, +h5, +h6 { + color: #404040; + line-height: 1.5; + margin: 1em 0 0.5em; + -webkit-hyphens: none; + hyphens: none; + adobe-hyphenate: none; +} + +h1 { + font-size: 220%; + margin-bottom: 1.5em; +} + +h2 { + font-size: 190%; +} + +h3 { + font-size: 160%; +} + +h4 { + font-size: 140%; +} + +h5 { + font-size: 130%; +} + +h6 { + font-size: 120%; +} + +hr { + margin: 0 0 19px; + border: 0; + border-bottom: 1px solid #ccc; +} + +blockquote { + padding: 13px 13px 21px 15px; + margin-bottom: 18px; + font-family:georgia,serif; + font-style: italic; +} + + blockquote:before { + content: "\201C"; + font-size: 300%; + margin-left: -10px; + font-family: serif; + color: #eee; + } + + blockquote p { + font-size: 120%; + margin-bottom: 0; + font-style: italic; + } + +code, pre { + font-family: monospace; +} + +code { + background-color: #fee9cc; + color: rgba(0, 0, 0, 0.75); + padding: 1px 3px; + -webkit-border-radius: 5px; + border-radius: 5px; + font-size: 85%; +} + +pre { + display: block; + padding: 14px; + margin: 0 0 18px; + font-size: 85%; + line-height: 1.3; + border: 1px solid #d9d9d9; + white-space: pre-wrap; + word-wrap: break-word; + -webkit-hyphens: none; + hyphens: none; + adobe-hyphenate: none; +} + + pre code { + background-color: #fff; + color: #737373; + padding: 0; + } + +code.sourceCode span.kw { color: #007020; font-weight: bold; } +code.sourceCode span.dt { color: #902000; } +code.sourceCode span.dv { color: #40a070; } +code.sourceCode span.bn { color: #40a070; } +code.sourceCode span.fl { color: #40a070; } +code.sourceCode span.ch { color: #4070a0; } +code.sourceCode span.st { color: #4070a0; } +code.sourceCode span.co { color: #60a0b0; font-style: italic; } +code.sourceCode span.ot { color: #007020; } +code.sourceCode span.al { color: red; font-weight: bold; } +code.sourceCode span.fu { color: #06287e; } +code.sourceCode span.re { } +code.sourceCode span.er { color: red; font-weight: bold; } + +body { + font-family: serif; +} \ No newline at end of file diff --git a/github-roam.epub b/github-roam.epub new file mode 100644 index 0000000..1756a75 Binary files /dev/null and b/github-roam.epub differ diff --git a/github-roam.md b/github-roam.md new file mode 100644 index 0000000..e69de29 diff --git a/github-roam.pdf b/github-roam.pdf new file mode 100644 index 0000000..4a82c8d Binary files /dev/null and b/github-roam.pdf differ diff --git a/github-roam.rtf b/github-roam.rtf new file mode 100644 index 0000000..7b1061f --- /dev/null +++ b/github-roam.rtf @@ -0,0 +1,6 @@ +{\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 Courier;}} +{\colortbl;\red255\green0\blue0;\red0\green0\blue255;} +\widowctrl\hyphauto + + +} diff --git a/img/cover.jpg b/img/cover.jpg new file mode 100644 index 0000000..f45bbec Binary files /dev/null and b/img/cover.jpg differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..8a223e8 --- /dev/null +++ b/index.html @@ -0,0 +1,28 @@ + + + + + + + Github 漫游指南 - + + + + + + + +

+

Github Roam

+

By Phodal Huang(Geek's Life)

+

+
+ + +
+ + +