Use Tuprules for pandoc

This commit is contained in:
Fabien Freling 2019-06-10 21:51:04 +02:00
parent ef89e98d08
commit dfd1ce60f4
8 changed files with 22 additions and 56 deletions

View file

@ -16,6 +16,6 @@ preview: tup
graph: graph:
tup graph . | dot -Tpng > graph.png tup graph . | dot -Tpng > graph.png
deploy: deploy: tup
rsync --checksum -ave 'ssh -p 4242' \ rsync --checksum -ave 'ssh -p 4242' \
build/* fab@ffreling.com:public_html/ffreling.com/public/ build/* fab@ffreling.com:public_html/ffreling.com/public/

12
Tupfile
View file

@ -1,11 +1,3 @@
: foreach *.md | templates/footer.html |> \ include_rules
pandoc --from markdown --to html \ : foreach *.md |> !pandoc |>
--template=templates/pandoc.html \
--css css/default.css \
--include-in-header=templates/header.html \
--include-before-body=templates/nav.html \
--include-after-body=templates/footer.html \
%f --output=%o \
|> %B.html
: favicon.png |> !tup_preserve |> : favicon.png |> !tup_preserve |>

9
Tuprules.tup Normal file
View file

@ -0,0 +1,9 @@
&root = .
!pandoc = | &(root)/templates/footer.html |> pandoc --from markdown --to html \
--template=&(root)/templates/pandoc.html \
--css &(root)/css/default.css \
--include-in-header=&(root)/templates/header.html \
--include-before-body=&(root)/templates/nav.html \
--include-after-body=&(root)/templates/footer.html \
%f --output=%o \
|> %B.html

View file

@ -1,9 +1,2 @@
: foreach *.md | ../../templates/footer.html |> \ include_rules
pandoc --from markdown --to html \ : foreach *.md |> !pandoc |>
--template=../../templates/pandoc.html \
--css ../../css/default.css \
--include-in-header=../../templates/header.html \
--include-before-body=../../templates/nav.html \
--include-after-body=../../templates/footer.html \
%f --output=%o \
|> %B.html

View file

@ -1,9 +1,2 @@
: foreach *.md | ../../templates/footer.html |> \ include_rules
pandoc --from markdown --to html \ : foreach *.md |> !pandoc |>
--template=../../templates/pandoc.html \
--css ../../css/default.css \
--include-in-header=../../templates/header.html \
--include-before-body=../../templates/nav.html \
--include-after-body=../../templates/footer.html \
%f --output=%o \
|> %B.html

View file

@ -1,9 +1,2 @@
: foreach *.md | ../../templates/footer.html |> \ include_rules
pandoc --from markdown --to html \ : foreach *.md |> !pandoc |>
--template=../../templates/pandoc.html \
--css ../../css/default.css \
--include-in-header=../../templates/header.html \
--include-before-body=../../templates/nav.html \
--include-after-body=../../templates/footer.html \
%f --output=%o \
|> %B.html

View file

@ -1,9 +1,2 @@
: foreach *.md | ../../templates/footer.html |> \ include_rules
pandoc --from markdown --to html \ : foreach *.md |> !pandoc |>
--template=../../templates/pandoc.html \
--css ../../css/default.css \
--include-in-header=../../templates/header.html \
--include-before-body=../../templates/nav.html \
--include-after-body=../../templates/footer.html \
%f --output=%o \
|> %B.html

View file

@ -1,9 +1,2 @@
: foreach *.md | ../../templates/footer.html |> \ include_rules
pandoc --from markdown --to html \ : foreach *.md |> !pandoc |>
--template=../../templates/pandoc.html \
--css ../../css/default.css \
--include-in-header=../../templates/header.html \
--include-before-body=../../templates/nav.html \
--include-after-body=../../templates/footer.html \
%f --output=%o \
|> %B.html