Skip to content

Commit

Permalink
Publish documentation via Github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
qznc committed Apr 30, 2016
1 parent aa0a749 commit 873e6c0
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ __dummy.html
*.o
*.obj
__test__library__
docs/
docs/*.html
gh-pages/
dub.selections.json
..-..-..-..-..-..-..-*
source-money.lst
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ then wrap `money` into your own data type.

Available via [dub on code.dlang.org](http://code.dlang.org/packages/money).

DDoc documentation on [Github pages](https://qznc.github.io/d-money/).

Licence is Boost v1.0.
35 changes: 35 additions & 0 deletions docs/custom.ddoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
DDOC = <!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name=viewport content="width=device-width, initial-scale=1">
<link type="text/css" href="theme.css" rel="stylesheet" media="all" />
<title>$(TITLE) ddoc</title>
<style>
body { max-width: 30em; margin: 1em auto; padding: 1em; }
h2,
pre { font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", Consolas, Monaco, "Liberation Mono", Andale Mono, monospace; }
h2 { font-size: 1.2em; font-weight: normal; white-space: nowrap; }
</style>
</head>
<body>
<h1>$(TITLE)</h1>
$(BODY)
</body>
</html>
H2 = <h2>$0</h2>
H3 = <h3>$0</h3>
STRONG = <strong>$0</strong>
EM = <em>$0</em>
DDOC_DECL = $(H2 $0)
DDOC_DECL_DD = <div class="declaration-description">$0</div>

DDOC_CLASS_MEMBERS = <div class="class-members">$0</div>
DDOC_SUMMARY = $(P $0)
DDOC_DESCRIPTION = $(P $0)

DDOC_MEMBERS = <div class="members">$0</div>
DDOC_ENUM_MEMBERS = <div class="enum-members">$0</div>
DDOC_MODULE_MEMBERS = <div class="module-members">$0</div>
DDOC_STRUCT_MEMBERS = <div class="struct-members">$0</div>
DDOC_TEMPLATE_MEMBERS = <div class="template-members">$0</div>
12 changes: 12 additions & 0 deletions docs/make.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

# check directory layout
[ -d docs ] || exit 1
[ -d gh-pages ] || exit 1

# build documentation
export DDOCFILE=docs/custom.ddoc
dub run -b docs

# prepare for Github
cp docs/money.html gh-pages/index.html

0 comments on commit 873e6c0

Please sign in to comment.