diff --git a/scripts/lib/templates.mjs b/scripts/lib/templates.mjs index 4c170ac..b467908 100644 --- a/scripts/lib/templates.mjs +++ b/scripts/lib/templates.mjs @@ -1,6 +1,8 @@ import { SITE_URL } from "./constants.mjs"; import { escapeHtml } from "./utils.mjs"; +const STORE_URL = "https://store.apophenia.news"; + const logo = ` @@ -18,6 +20,22 @@ const logo = ` `; +const links = [ + { href: "/", label: "Home" }, + { href: "/newsletter/", label: "Newsletter" }, + { href: STORE_URL, label: "Store", external: true }, + { href: "/write/", label: "Become a writer" }, + { href: "/rss.xml", label: "RSS" } +]; + +const navLinks = (cls = "") => + links + .map( + (l) => + `${l.label}` + ) + .join("\n "); + export const shellHead = ({ title, desc, image, url, type = "website" }) => ` @@ -54,16 +72,10 @@ export const nav = `