Add Tup generator
This commit is contained in:
parent
64e71a6023
commit
1135a85073
10
.gitignore
vendored
10
.gitignore
vendored
|
@ -1,11 +1,9 @@
|
||||||
# Haskell
|
|
||||||
*.o
|
|
||||||
*.hi
|
|
||||||
|
|
||||||
# Hakyll
|
# Hakyll
|
||||||
_cache
|
_cache
|
||||||
_site
|
_site
|
||||||
site
|
site
|
||||||
|
|
||||||
# Vim
|
# Tup
|
||||||
*.swp
|
/build/*
|
||||||
|
!/build/tup.config
|
||||||
|
graph.png
|
||||||
|
|
11
Makefile
11
Makefile
|
@ -5,3 +5,14 @@ all: site.hs
|
||||||
|
|
||||||
build: all
|
build: all
|
||||||
./${TARGET} build
|
./${TARGET} build
|
||||||
|
|
||||||
|
tup:
|
||||||
|
tup build
|
||||||
|
|
||||||
|
graph:
|
||||||
|
tup graph . | dot -Tpng > graph.png
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
rsync --checksum -ave 'ssh -p 4242' \
|
||||||
|
build/* fab@ffreling.com:public_html/ffreling.com/public/
|
||||||
|
|
||||||
|
|
8
Tupfile
Normal file
8
Tupfile
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
: foreach *.md | templates/footer.html |> \
|
||||||
|
pandoc --from markdown --to html \
|
||||||
|
--template=templates/pandoc.html \
|
||||||
|
--css css/default.css \
|
||||||
|
--include-before-body=templates/nav.html \
|
||||||
|
--include-after-body=templates/footer.html \
|
||||||
|
%f --output=%o \
|
||||||
|
|> %B.html
|
0
Tupfile.ini
Normal file
0
Tupfile.ini
Normal file
0
build/tup.config
Normal file
0
build/tup.config
Normal file
1
css/Tupfile
Normal file
1
css/Tupfile
Normal file
|
@ -0,0 +1 @@
|
||||||
|
:foreach *.css |> !tup_preserve |>
|
1
images/Tupfile
Normal file
1
images/Tupfile
Normal file
|
@ -0,0 +1 @@
|
||||||
|
:foreach *.png *.jpg |> !tup_preserve |>
|
2
index.md
2
index.md
|
@ -8,7 +8,7 @@ For an up-to-date professional resume, you might want to head over to my [Linked
|
||||||
|
|
||||||
<div align=right style="padding-top: 100px;">
|
<div align=right style="padding-top: 100px;">
|
||||||
<a href="mantis.html">
|
<a href="mantis.html">
|
||||||
<img src="/images/mantis_shrimp.png" alt="Mantis shrimp, minding its own business">
|
<img src="images/mantis_shrimp.png" alt="Mantis shrimp, minding its own business">
|
||||||
</a>
|
</a>
|
||||||
<br clear=all>
|
<br clear=all>
|
||||||
<i>May the mighty mantis shrimp smile upon you.</i>
|
<i>May the mighty mantis shrimp smile upon you.</i>
|
||||||
|
|
8
projects/dawnchaos/Tupfile
Normal file
8
projects/dawnchaos/Tupfile
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
: foreach *.md | ../../templates/footer.html |> \
|
||||||
|
pandoc --from markdown --to html \
|
||||||
|
--template=../../templates/pandoc.html \
|
||||||
|
--css ../../css/default.css \
|
||||||
|
--include-before-body=../../templates/nav.html \
|
||||||
|
--include-after-body=../../templates/footer.html \
|
||||||
|
%f --output=%o \
|
||||||
|
|> %B.html
|
8
projects/maestro/Tupfile
Normal file
8
projects/maestro/Tupfile
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
: foreach *.md | ../../templates/footer.html |> \
|
||||||
|
pandoc --from markdown --to html \
|
||||||
|
--template=../../templates/pandoc.html \
|
||||||
|
--css ../../css/default.css \
|
||||||
|
--include-before-body=../../templates/nav.html \
|
||||||
|
--include-after-body=../../templates/footer.html \
|
||||||
|
%f --output=%o \
|
||||||
|
|> %B.html
|
8
projects/oboy/Tupfile
Normal file
8
projects/oboy/Tupfile
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
: foreach *.md | ../../templates/footer.html |> \
|
||||||
|
pandoc --from markdown --to html \
|
||||||
|
--template=../../templates/pandoc.html \
|
||||||
|
--css ../../css/default.css \
|
||||||
|
--include-before-body=../../templates/nav.html \
|
||||||
|
--include-after-body=../../templates/footer.html \
|
||||||
|
%f --output=%o \
|
||||||
|
|> %B.html
|
8
projects/trailr/Tupfile
Normal file
8
projects/trailr/Tupfile
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
: foreach *.md | ../../templates/footer.html |> \
|
||||||
|
pandoc --from markdown --to html \
|
||||||
|
--template=../../templates/pandoc.html \
|
||||||
|
--css ../../css/default.css \
|
||||||
|
--include-before-body=../../templates/nav.html \
|
||||||
|
--include-after-body=../../templates/footer.html \
|
||||||
|
%f --output=%o \
|
||||||
|
|> %B.html
|
8
projects/whereiscar/Tupfile
Normal file
8
projects/whereiscar/Tupfile
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
: foreach *.md | ../../templates/footer.html |> \
|
||||||
|
pandoc --from markdown --to html \
|
||||||
|
--template=../../templates/pandoc.html \
|
||||||
|
--css ../../css/default.css \
|
||||||
|
--include-before-body=../../templates/nav.html \
|
||||||
|
--include-after-body=../../templates/footer.html \
|
||||||
|
%f --output=%o \
|
||||||
|
|> %B.html
|
1
templates/Tupfile
Normal file
1
templates/Tupfile
Normal file
|
@ -0,0 +1 @@
|
||||||
|
: |> ./generate_footer.sh > %o |> footer.html
|
9
templates/generate_footer.sh
Executable file
9
templates/generate_footer.sh
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
cat << EOF
|
||||||
|
<div id="footer">
|
||||||
|
Copyright © Fabien Freling 2007-$(date +%Y)
|
||||||
|
</div>
|
||||||
|
EOF
|
6
templates/nav.html
Normal file
6
templates/nav.html
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<div id="banner"></div>
|
||||||
|
<div id="navigation">
|
||||||
|
<a href="index.html">Home</a>
|
||||||
|
<a href="projects.html">Projects</a>
|
||||||
|
<a href="about.html">About</a>
|
||||||
|
</div>
|
72
templates/pandoc.html
Normal file
72
templates/pandoc.html
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="$lang$" xml:lang="$lang$"$if(dir)$ dir="$dir$"$endif$>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="generator" content="pandoc" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||||
|
$for(author-meta)$
|
||||||
|
<meta name="author" content="$author-meta$" />
|
||||||
|
$endfor$
|
||||||
|
$if(date-meta)$
|
||||||
|
<meta name="dcterms.date" content="$date-meta$" />
|
||||||
|
$endif$
|
||||||
|
$if(keywords)$
|
||||||
|
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
|
||||||
|
$endif$
|
||||||
|
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
|
||||||
|
<style>
|
||||||
|
code{white-space: pre-wrap;}
|
||||||
|
span.smallcaps{font-variant: small-caps;}
|
||||||
|
span.underline{text-decoration: underline;}
|
||||||
|
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||||||
|
$if(quotes)$
|
||||||
|
q { quotes: "“" "”" "‘" "’"; }
|
||||||
|
$endif$
|
||||||
|
</style>
|
||||||
|
$if(highlighting-css)$
|
||||||
|
<style>
|
||||||
|
$highlighting-css$
|
||||||
|
</style>
|
||||||
|
$endif$
|
||||||
|
$for(css)$
|
||||||
|
<link rel="stylesheet" href="$css$" />
|
||||||
|
$endfor$
|
||||||
|
$if(math)$
|
||||||
|
$math$
|
||||||
|
$endif$
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
$for(header-includes)$
|
||||||
|
$header-includes$
|
||||||
|
$endfor$
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
$for(include-before)$
|
||||||
|
$include-before$
|
||||||
|
$endfor$
|
||||||
|
$if(title)$
|
||||||
|
<header id="title-block-header">
|
||||||
|
<h1 class="title">$title$</h1>
|
||||||
|
$if(subtitle)$
|
||||||
|
<p class="subtitle">$subtitle$</p>
|
||||||
|
$endif$
|
||||||
|
$for(author)$
|
||||||
|
<p class="author">$author$</p>
|
||||||
|
$endfor$
|
||||||
|
$if(date)$
|
||||||
|
<p class="date">$date$</p>
|
||||||
|
$endif$
|
||||||
|
</header>
|
||||||
|
$endif$
|
||||||
|
$if(toc)$
|
||||||
|
<nav id="$idprefix$TOC" role="doc-toc">
|
||||||
|
$table-of-contents$
|
||||||
|
</nav>
|
||||||
|
$endif$
|
||||||
|
$body$
|
||||||
|
$for(include-after)$
|
||||||
|
$include-after$
|
||||||
|
$endfor$
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in a new issue