Use webRoot for relative links
This commit is contained in:
parent
8fcf435b17
commit
a2c8fb9dd4
10
Makefile
10
Makefile
|
@ -3,11 +3,6 @@ all: tup
|
|||
tup:
|
||||
tup build
|
||||
|
||||
preview: tup
|
||||
rm -rf preview
|
||||
cp -r build preview
|
||||
rm -f preview/tup.config
|
||||
|
||||
clean:
|
||||
git nuke
|
||||
|
||||
|
@ -18,3 +13,8 @@ deploy: clean tup
|
|||
rsync --checksum --copy-links -ave 'ssh -p 4242' \
|
||||
--exclude-from=rsync_excludes.txt \
|
||||
build/* fab@ffreling.com:public_html/ffreling.com/public/
|
||||
|
||||
preview: tup
|
||||
rsync --checksum --copy-links -ave 'ssh -p 4242' \
|
||||
--exclude-from=rsync_excludes.txt \
|
||||
build/* preview/
|
||||
|
|
1
Tupfile
1
Tupfile
|
@ -1,3 +1,4 @@
|
|||
include_rules
|
||||
|
||||
: foreach *.md |> !pandoc |>
|
||||
: favicon.png |> !tup_preserve |>
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
&root = .
|
||||
!pandoc = | &(root)/templates/footer.html |> pandoc --from markdown --to html \
|
||||
|
||||
!pandoc = | &(root)/templates/footer.html \
|
||||
|> ^ pandoc %f^ \
|
||||
pandoc --from markdown --to html \
|
||||
--template=&(root)/templates/pandoc.html \
|
||||
--variable=webRoot:&(root) \
|
||||
--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 --output=%o \
|
||||
%f | sed 's|%%webRoot%%|&(root)|g' > %o \
|
||||
|> %B.html
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
fabien.jpg \
|
||||
fabien_zenly.jpg \
|
||||
mantis_shrimp.png \
|
||||
|> cwebp -q 80 %f -o %o |> %B.webp
|
||||
|> ^ WebP conversion %f^ cwebp -q 80 -quiet %f -o %o |> %B.webp
|
||||
|
||||
: foreach \
|
||||
github_logo.png \
|
||||
gitlab_logo.png \
|
||||
leencktyn_logo.png \
|
||||
mastodon.jpg \
|
||||
|> cwebp -q 80 -resize 0 40 %f -o %o |> %B_40.webp
|
||||
|> ^ WebP conversion %f^ cwebp -q 80 -quiet -resize 0 40 %f -o %o |> %B_40.webp
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
include_rules
|
||||
|
||||
: foreach *.md |> !pandoc |>
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
include_rules
|
||||
|
||||
: foreach *.md |> !pandoc |>
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
include_rules
|
||||
|
||||
: foreach *.md |> !pandoc |>
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
include_rules
|
||||
|
||||
: foreach *.md |> !pandoc |>
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
include_rules
|
||||
|
||||
: foreach *.md |> !pandoc |>
|
||||
|
|
|
@ -1 +1 @@
|
|||
<link rel="icon" type="image/png" href="favicon.png">
|
||||
<link rel="icon" type="image/png" href="%webRoot%/favicon.png">
|
||||
|
|
|
@ -1,6 +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>
|
||||
<a href="%webRoot%/index.html">Home</a>
|
||||
<a href="%webRoot%/projects.html">Projects</a>
|
||||
<a href="%webRoot%/about.html">About</a>
|
||||
</div>
|
||||
|
|
|
@ -34,9 +34,6 @@ $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$
|
||||
|
@ -45,14 +42,6 @@ $endfor$
|
|||
$for(include-before)$
|
||||
$include-before$
|
||||
$endfor$
|
||||
|
||||
<div id="banner"></div>
|
||||
<div id="navigation">
|
||||
<a href=$webRoot$/index.html>Home</a>
|
||||
<a href=$webRoot$/projects.html>Projects</a>
|
||||
<a href=$webRoot$/about.html>About</a>
|
||||
</div>
|
||||
|
||||
$if(title)$
|
||||
<header id="title-block-header">
|
||||
<h1 class="title">$title$</h1>
|
||||
|
|
Loading…
Reference in a new issue