website

Sources for my personal website
Log | Files | Refs | README

commit 355f270ec0021d5436e1b70d0be469309dfb9a93
parent 1bd84f81076e7d65b6b29e40210acb3420fe4ef9
Author: Sven Möller <sven-moeller@outlook.de>
Date:   Fri, 10 Dec 2021 21:37:26 +0100

Make html template

Diffstat:
MMakefile | 6++----
MREADME.md | 4+++-
D_footer.html | 5-----
D_header.html | 9---------
Mindex.md | 4+++-
Atemplate.html | 15+++++++++++++++
6 files changed, 23 insertions(+), 20 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,4 +1,4 @@ -MD2HTML := pandoc +MD2HTML := pandoc --template template.html SRCS := $(wildcard *.md) DST_DIR ?= dst @@ -8,9 +8,7 @@ all: $(SRCS:%.md=%.html) %.html: %.md mkdir -p $(DST_DIR) cp style.css $(DST_DIR) - cat _header.html > $(DST_DIR)/$@ - $(MD2HTML) $< >> $(DST_DIR)/$@ - cat _footer.html >> $(DST_DIR)/$@ + $(MD2HTML) $< -o $(DST_DIR)/$@ clean: rm -rvf $(DST_DIR) diff --git a/README.md b/README.md @@ -1,4 +1,6 @@ -# Building a static website +--- +title: Building a static website +--- Here I describe how I (automatically) build my website. diff --git a/_footer.html b/_footer.html @@ -1,5 +0,0 @@ - <footer> - 🏠<a href="https://svenmoeller.xyz">svenmoeller.xyz</a> <span style="white-space: nowrap;">📧<a href="mailto:sven-moeller@outlook.de">sven-moeller@outlook.de</a></span> - </footer> - </body> -</html> diff --git a/_header.html b/_header.html @@ -1,9 +0,0 @@ -<!DOCTYPE html> -<html lang="de"> - <head> - <title></title> - <meta charset=UTF-8> - <link rel=stylesheet href=style.css> - <meta name="viewport" content="width=device-width, initial-scale=1"> - </head> - <body> diff --git a/index.md b/index.md @@ -1,4 +1,6 @@ -# Welcome! +--- +title: Welcome! +--- To my personal website! diff --git a/template.html b/template.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <title>$title$</title> + <meta charset=UTF-8> + <link rel=stylesheet href=style.css> + <meta name="viewport" content="width=device-width, initial-scale=1"> + </head> + <body> + $body$ + <footer> + 🏠<a href="https://svenmoeller.xyz">svenmoeller.xyz</a> <span style="white-space: nowrap;">📧<a href="mailto:sven-moeller@outlook.de">sven-moeller@outlook.de</a></span> + </footer> + </body> +</html>