forked from progit/progit
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a couchapp markdown reader for progit called "chacon"
- Loading branch information
Showing
9 changed files
with
815 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# TODO: research wildcard targets | ||
|
||
en: figures | ||
cp ../en/*/*.markdown ./_docs/ | ||
|
||
de: figures | ||
cp ../de/*/*.markdown ./_docs/ | ||
|
||
figures: | ||
mkdir -p _attachments/figures/ | ||
cp ../figures/* _attachments/figures/ | ||
|
||
clean: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_design/chacon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
function(doc, req) { | ||
//!json templates | ||
send(templates.head); | ||
var markdown = require("vendor/markdown/showdown"); | ||
|
||
var resolve_figures = function (text) { | ||
return text.replace(/Insert ([^\.]+).png/g, function(all, figure) { | ||
return '<img src="../../figures/' + figure + '-tn.png"><br>'; | ||
}); | ||
}; | ||
|
||
send(markdown.toHtml(resolve_figures(doc.body))); | ||
send(templates.foot); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<li><a href="../../_show/chapter/{{id}}">{{key}}</a></li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
<div id="footer"> | ||
<div id="fleuron">❦</div> | ||
<a href="http://progit.org/">© 2009–2010 Scott Chacon</a> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | ||
<title>Progit — By Scott Chacon</title> | ||
<style type="text/css" media="screen"> | ||
body { | ||
font-family:"Minion Pro"; | ||
width: 32em; | ||
|
||
margin-left:2em; | ||
} | ||
|
||
ol li { | ||
list-style-type: none; | ||
} | ||
|
||
code { | ||
font-family:monospace; | ||
} | ||
|
||
#chapters { | ||
float:right; | ||
margin:6ex 0 8ex 4em; | ||
} | ||
|
||
#footer { | ||
text-align:center; | ||
margin-bottom:6ex; | ||
} | ||
|
||
#footer a { | ||
text-decoration: none; | ||
} | ||
|
||
#fleuron { | ||
margin:6ex 0 8ex 0; | ||
} | ||
|
||
</style> | ||
</head> | ||
|
||
<body> | ||
<div id="chapters"> | ||
<ol> | ||
<li><a href="01-chapter1">Chapter 1</a></li> | ||
<li><a href="01-chapter2">Chapter 2</a></li> | ||
<li><a href="01-chapter3">Chapter 3</a></li> | ||
<li><a href="01-chapter4">Chapter 4</a></li> | ||
<li><a href="01-chapter5">Chapter 5</a></li> | ||
<li><a href="01-chapter6">Chapter 6</a></li> | ||
<li><a href="01-chapter7">Chapter 7</a></li> | ||
<li><a href="01-chapter8">Chapter 8</a></li> | ||
<li><a href="01-chapter9">Chapter 9</a></li> | ||
</ol> | ||
</div> |
Oops, something went wrong.