diff --git a/Tupfile b/Tupfile index ae9d358..e39d14d 100644 --- a/Tupfile +++ b/Tupfile @@ -1,4 +1,4 @@ include_rules -: foreach *.md |> !pandoc |> +: foreach *.md |> !html |> : favicon.png |> !tup_preserve |> diff --git a/Tuprules.tup b/Tuprules.tup index 85eac9c..5c1360e 100644 --- a/Tuprules.tup +++ b/Tuprules.tup @@ -1,31 +1,11 @@ &root = . -!pandoc = | &(root)/templates/footer.html \ - |> ^ pandoc %f^ \ - pandoc --from markdown --to html \ - --template=&(root)/templates/pandoc.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 +HTML_TEMPLATE = main.html -!project = | &(root)/templates/footer.html \ - |> ^ pandoc %f^ \ - pandoc --from markdown --to html \ - --template=&(root)/templates/project.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 - -!article = | &(root)/templates/footer.html \ - |> ^ pandoc %f^ \ - pandoc --from markdown --to html \ - --template=&(root)/templates/article.html \ +!html = | &(root)/templates/footer.html \ + |> ^ html %f^ \ + pandoc --from markdown --to html \ + --template=&(root)/templates/$(HTML_TEMPLATE) \ --css &(root)/css/style.css \ --include-in-header=&(root)/templates/header.html \ --include-before-body=&(root)/templates/nav.html \ diff --git a/articles/Tupfile b/articles/Tupfile index de31884..c8d9bfc 100644 --- a/articles/Tupfile +++ b/articles/Tupfile @@ -1,4 +1,5 @@ include_rules +HTML_TEMPLATE = article.html -: |> ./generate_listing.sh > %o |> index.md -: foreach *.md |> !article |> +: *.md |> ./generate_listing.sh > %o |> index.md +: foreach *.md |> !html |> diff --git a/projects/Tuprules.tup b/projects/Tuprules.tup new file mode 100644 index 0000000..186ad50 --- /dev/null +++ b/projects/Tuprules.tup @@ -0,0 +1 @@ +HTML_TEMPLATE = project.html diff --git a/projects/dawnchaos/Tupfile b/projects/dawnchaos/Tupfile index d82fca1..2ba7d0a 100644 --- a/projects/dawnchaos/Tupfile +++ b/projects/dawnchaos/Tupfile @@ -1,4 +1,4 @@ include_rules -: index.md |> !project |> +: index.md |> !html |> : thumbnail.png |> convert %f -blur 0x8 %o |> thumb.png diff --git a/projects/maestro/Tupfile b/projects/maestro/Tupfile index d82fca1..2ba7d0a 100644 --- a/projects/maestro/Tupfile +++ b/projects/maestro/Tupfile @@ -1,4 +1,4 @@ include_rules -: index.md |> !project |> +: index.md |> !html |> : thumbnail.png |> convert %f -blur 0x8 %o |> thumb.png diff --git a/projects/oboy/Tupfile b/projects/oboy/Tupfile index 0bc4145..9e84688 100644 --- a/projects/oboy/Tupfile +++ b/projects/oboy/Tupfile @@ -1,3 +1,3 @@ include_rules -: index.md |> !project |> +: index.md |> !html |> diff --git a/projects/rightcoin/Tupfile b/projects/rightcoin/Tupfile index eeec449..3d3c206 100644 --- a/projects/rightcoin/Tupfile +++ b/projects/rightcoin/Tupfile @@ -1,4 +1,4 @@ include_rules -: index.md |> !project |> +: index.md |> !html |> : thumbnail.gif |> convert %f -blur 0x8 %o |> thumb.gif diff --git a/projects/trailr/Tupfile b/projects/trailr/Tupfile index 2e063fd..997c4c2 100644 --- a/projects/trailr/Tupfile +++ b/projects/trailr/Tupfile @@ -1,4 +1,4 @@ include_rules -: index.md |> !project |> +: index.md |> !html |> : thumbnail.jpg |> convert %f -blur 0x8 %o |> thumb.jpg diff --git a/projects/whereiscar/Tupfile b/projects/whereiscar/Tupfile index d82fca1..2ba7d0a 100644 --- a/projects/whereiscar/Tupfile +++ b/projects/whereiscar/Tupfile @@ -1,4 +1,4 @@ include_rules -: index.md |> !project |> +: index.md |> !html |> : thumbnail.png |> convert %f -blur 0x8 %o |> thumb.png diff --git a/templates/main.html b/templates/main.html new file mode 100644 index 0000000..aa426c6 --- /dev/null +++ b/templates/main.html @@ -0,0 +1,55 @@ + + + + + + +$for(author-meta)$ + +$endfor$ +$if(date-meta)$ + +$endif$ +$if(keywords)$ + +$endif$ + $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ +$for(css)$ + +$endfor$ +$if(math)$ + $math$ +$endif$ +$for(header-includes)$ + $header-includes$ +$endfor$ + + +$for(include-before)$ +$include-before$ +$endfor$ +$if(title)$ +
+

$title$

+$if(subtitle)$ +

$subtitle$

+$endif$ +$for(author)$ +

$author$

+$endfor$ +$if(date)$ +

$date$

+$endif$ +
+$endif$ +$if(toc)$ + +$endif$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ + +