~tardypad/tardypad.me

202ff21352937f8cb67e3e611dfdff1d751fe50e — Damien Tardy-Panis a month ago 781f85f
www: use includes directory for include-only parts
4 files changed, 8 insertions(+), 4 deletions(-)

M www/Makefile
M www/nginx/www.conf
R www/root/{resume_content.html => includes/resume_content.html}
M www/root/resume.html
M www/Makefile => www/Makefile +3 -3
@@ 1,11 1,11 @@
build: root/resume_content.html
build: root/includes/resume_content.html
	mkdir -p build
	sed -e '/logo.svg/ {r root/logo.svg' -e 'd }' root/index.html > build/index.html
	sed -e '/resume_content.html/ {r root/resume_content.html' -e 'd }' root/resume.html > build/resume.html
	sed -e '/resume_content.html/ {r root/includes/resume_content.html' -e 'd }' root/resume.html > build/resume.html
	cp root/style.css build/
	ln -sf resume.html build/resume

root/resume_content.html: src/resume.md
root/includes/resume_content.html: src/resume.md
	cmark $< \
	| sed 's|^<\([^>]*\)>\(.*\) {\(.*\)}<.*|<\1 class="\3">\2</\1>|' \
	| sed 's|  *</|</|g' \

M www/nginx/www.conf => www/nginx/www.conf +4 -0
@@ 19,6 19,10 @@ server {
    gzip on;
    ssi on;

    location /includes/ {
        deny all;
    }

    try_files $uri $uri/index.html $uri.html =404;

    ssl_certificate /etc/letsencrypt/live/tardypad.me/fullchain.pem;

R www/root/resume_content.html => www/root/includes/resume_content.html +0 -0
M www/root/resume.html => www/root/resume.html +1 -1
@@ 5,6 5,6 @@
        <link rel="stylesheet" href="style.css">
    </head>
    <body>
        <!--#include file="resume_content.html" -->
        <!--#include file="includes/resume_content.html" -->
    </body>
</html>