Topic: https://brettterpstra.com/2013/01/23/maintaining-documentation-in-markdown/
hide preview

What's next? verify your email address for reply notifications!

Lauri Ranta 12y, 56d ago

I really like just long static HTML pages, like the HTML version of the Bash man page. My (book-length) website is built with this shell script:

template="<!doctype html>
<meta charset=\"utf-8\">
<style>
$(sed 's/&/&/g;s/</</g;s/>/>/g' ~/Code/site/site.css)</style>"
for f in ~/Pages/*.txt; do
base=${f##*/}
echo "$template
<title>$(head -n1 $f | sed 's/^# //')</title>
$(/usr/local/bin/pandoc --strict -p $f)" > ~/Sites/me/${base%txt}html
done

If your website was just a single long Markdown document, it could be built with one Pandoc command:

pandoc index.md --template template.html -c style.css --toc -o index.html

hide preview

What's next? verify your email address for reply notifications!

Lauri Ranta 12y, 56d ago

I really like just long static HTML pages, like the HTML version of the Bash man page. My (book-length) website is built with this shell script:

template="<!doctype html>
<meta charset=\"utf-8\">
<style>
$(sed 's/&/&/g;s/</</g;s/>/>/g' ~/Code/site/site.css)</style>"
for f in ~/Pages/*.txt; do
base=${f##*/}
echo "$template
<title>$(head -n1 $f | sed 's/^# //')</title>
$(/usr/local/bin/pandoc --strict -p $f)" > ~/Sites/me/${base%txt}html
done

If your website was just a single long Markdown document, it could be built with one Pandoc command:

pandoc index.md --template template.html -c style.css --toc -o index.html

hide preview

What's next? verify your email address for reply notifications!

Larry Hynes 12y, 56d ago

Actually, if you wanted to go all-out with the bells and whistles, have you tried Web Book Boilerplate? Takes your chapters in Markdown and outputs HTML, mobi and epub formats (or pretty much anything that Pandoc supports, I think) all styled with your SASS or CSS, I had a quick play with it and got it up and running in no time. Which means it's idiot-proof.

https://github.com/PascalPr...

remark link
hide preview

What's next? verify your email address for reply notifications!

ttscoff 12y, 56d ago

That looks awesome, I'll have to dig into it. "d" looks pretty sweet, too.

hide preview

What's next? verify your email address for reply notifications!

Larry Hynes 12y, 56d ago

I came across "d", by Steve Losh, some time ago, thought it looked interesting:

https://github.com/sjl/d

hide preview

What's next? verify your email address for reply notifications!