website

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

commit 2131278453454c621eedadf5ee9e8cf5a32fada2
parent e0dca1e93f53a2b1fba7fb1f479754af649eb796
Author: Sven Möller <sven-moeller@outlook.de>
Date:   Mon, 20 Dec 2021 21:32:32 +0100

Use h1 tag as web page title

Diffstat:
MMakefile | 3++-
MREADME.md | 4+---
Mindex.md | 4+---
Mtemplate.html | 1-
4 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile @@ -8,7 +8,8 @@ DSTS := $(SRCS:%.md=$(DST_DIR)/%.html) all: $(DSTS) $(DST_DIR)/style.css $(DST_DIR)/%.html: %.md template.html | $(DST_DIR) - pandoc --template template.html $< -o $@ + title=$$(sed -nE 's/^#\s+//p' $<); \ + pandoc --template template.html --metadata title="$$title" -o $@ $< $(DST_DIR)/style.css: style.css | $(DST_DIR) cp $< $@ diff --git a/README.md b/README.md @@ -1,6 +1,4 @@ ---- -title: Sources for my personal website ---- +# Sources for my personal website See <https://svenmoeller.xyz> diff --git a/index.md b/index.md @@ -1,6 +1,4 @@ ---- -title: Welcome! ---- +# Welcome! To my personal website! diff --git a/template.html b/template.html @@ -7,7 +7,6 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> - <h1>$title$</h1> $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>