diff --git a/Tuprules.tup b/Tuprules.tup index cdfe965..85eac9c 100644 --- a/Tuprules.tup +++ b/Tuprules.tup @@ -21,3 +21,14 @@ --include-after-body=&(root)/templates/footer.html \ %f | sed 's|%%webRoot%%|&(root)|g' > %o \ |> %B.html + +!article = | &(root)/templates/footer.html \ + |> ^ pandoc %f^ \ + pandoc --from markdown --to html \ + --template=&(root)/templates/article.html \ + --css &(root)/css/style.css \ + --include-in-header=&(root)/templates/header.html \ + --include-before-body=&(root)/templates/nav.html \ + --include-after-body=&(root)/templates/footer.html \ + %f | sed 's|%%webRoot%%|&(root)|g' > %o \ + |> %B.html diff --git a/articles/Tupfile b/articles/Tupfile new file mode 100644 index 0000000..780e2ae --- /dev/null +++ b/articles/Tupfile @@ -0,0 +1,4 @@ +include_rules + +# TODO: autogenerate +: foreach *.md |> !article |> diff --git a/articles/index.md b/articles/index.md new file mode 100644 index 0000000..03872df --- /dev/null +++ b/articles/index.md @@ -0,0 +1,7 @@ +--- +title: Articles +--- + +
diff --git a/mantis.md b/articles/mantis.md similarity index 99% rename from mantis.md rename to articles/mantis.md index e50ed9c..e7a30e7 100644 --- a/mantis.md +++ b/articles/mantis.md @@ -1,5 +1,6 @@ --- title: Mantis Shrimp +date: 2011-08-09 --- ## All glory to the mantis shrimp diff --git a/templates/article.html b/templates/article.html new file mode 100644 index 0000000..e9022db --- /dev/null +++ b/templates/article.html @@ -0,0 +1,69 @@ + + + + + + +$for(author-meta)$ + +$endfor$ +$if(date-meta)$ + +$endif$ +$if(keywords)$ + +$endif$ +$subtitle$
+$endif$ +$for(author)$ + +$endfor$ +$if(date)$ +$date$
+$endif$ +