From 943edfa08d89fa8f3da387d08ddf2bd1bcde8aa3 Mon Sep 17 00:00:00 2001 From: JustineSmithies Date: Sun, 14 May 2023 11:55:24 +0100 Subject: blarg now creates correct titles --- blarg | 6 +++--- header.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/blarg b/blarg index 09d5b55..3ed58fd 100755 --- a/blarg +++ b/blarg @@ -17,7 +17,7 @@ index_tsv() { index_html() { # Print header title=$(sed -n '/^# /{s/# //p; q}' index.md) - sed "s/{{TITLE}}/$title/" header.html + sed -e 's/{{TITLE}}//g' header.html # Intro text $MARKDOWN index.md @@ -44,7 +44,7 @@ atom_xml() { cat < - $(grep -o '<title>.*' header.html | sed 's/\(\|<\/title>\)//g') + $(grep -o '<title>.*' header.html | sed 's/\(\|{{TITLE}}<\/title>\)//g') $(date --iso=seconds) @@ -93,7 +93,7 @@ write_page() { $MARKDOWN "$filename" | \ sed -e '1,/h1>/{/h1>/a '$dates_text'' -e '}' | \ cat header.html - | \ - sed "s/{{TITLE}}/$title/" \ + sed "s/{{TITLE}}/ - $title/" \ > "$target" && sed "s/{{YEAR}}/$year/" footer.html >> "$target" } diff --git a/header.html b/header.html index edf5e6c..b9b4048 100644 --- a/header.html +++ b/header.html @@ -3,7 +3,7 @@ - Justine Smithies blog + Justine Smithies blog{{TITLE}}