diff options
author | JustineSmithies <justine@smithies.me.uk> | 2023-05-14 11:55:24 +0100 |
---|---|---|
committer | JustineSmithies <justine@smithies.me.uk> | 2023-05-14 11:55:24 +0100 |
commit | 943edfa08d89fa8f3da387d08ddf2bd1bcde8aa3 (patch) | |
tree | 8ad928898127126893215b07f1737bd3235d8410 | |
parent | 8fac6b9b99955832cb8912365ccced6b1c0f4c6a (diff) |
blarg now creates correct titles
-rwxr-xr-x | blarg | 6 | ||||
-rw-r--r-- | header.html | 2 |
2 files changed, 4 insertions, 4 deletions
@@ -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 <<EOF <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> - <title>$(grep -o '<title>.*</title>' header.html | sed 's/\(<title>\|<\/title>\)//g')</title> + <title>$(grep -o '<title>.*</title>' header.html | sed 's/\(<title>\|{{TITLE}}<\/title>\)//g')</title> <link href="$uri" rel="self" /> <updated>$(date --iso=seconds)</updated> <author> @@ -93,7 +93,7 @@ write_page() { $MARKDOWN "$filename" | \ sed -e '1,/h1>/{/h1>/a <small><b>'$dates_text'</b></small>' -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 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Justine Smithies blog</title> + <title>Justine Smithies blog{{TITLE}}</title> <link href="https://justine.smithies.me.uk/atom.xml" type="application/atom+xml" rel="alternate" title="Atom feed for blog posts"> <style> body { |