commit df07e1050a0dda42e5e00179a1946a72df2e80a2 parent 3b1a04a0fbc1d6ac7b90029deb10a2f64507fc2d Author: Jacob R. Edwards <jacob@jacobedwards.org> Date: Tue, 29 Oct 2024 17:13:16 -0700 Add <title> and some basic CSS to policy pages Diffstat:
| M | Makefile | | | 2 | +- |
| A | bin/make_policy | | | 11 | +++++++++++ |
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile @@ -23,7 +23,7 @@ update_libs: .endfor update_policies: - for p in ./files/policies/*.md; do smu < $$p > $${p%.md}.html; done + for p in ./files/policies/*.md; do ./bin/make_policy $$p > $${p%.md}.html; done clean: rm -rf lib/ diff --git a/bin/make_policy b/bin/make_policy @@ -0,0 +1,11 @@ +#!/bin/sh + +title="$(sed -nE '/^# +/ { s///; p; q; }' < "$1")" +echo "<html><head> + <title>Spaceplanner $title</title> + <link rel="stylesheet" type="text/css" href="./main.css"> +</head><body>" + +smu < "$1" + +echo "</body></html>"