# later
FORMATTED_ARTICLES=$(patsubst temp/%, %, $(_FORMATTED_ARTICLES))
+COMMONS=$(wildcard template/common/*)
+
# don't delete intermediate files when done; otherwise we always full rebuild
.SECONDARY:
temp/atom.unformatted_atom: $(FORMATTED_ARTICLES) template/atom.xml.template
sblg -t template/atom.xml.template -a -o $@ $(FORMATTED_ARTICLES)
+template/%.template: template/%.sh $(COMMONS)
+ ./$< | hxnormalize -x >$@
+
clean:
rm temp/*
rm $(OUTDIR)/*
--- /dev/null
+#!/bin/sh -e
+
+cat template/common/intro.xhtml.template.fragment
+
+cat <<'EOF'
+ <meta content="${sblg-stripbase}.xhtml" property="og:url" />
+ <meta content="${sblg-title}: of æsc and smoke: a blog by cat æscling" property="og:title" />
+ <meta content="${sblg-aside}" property="og:description" />
+ <title>${sblg-title}: of æsc and smoke: a blog by cat æscling</title>
+EOF
+
+cat template/common/style-body.xhtml.template.fragment
+
+cat <<'EOF'
+ <h1><a href="/">of æsc and smoke</a></h1>
+
+ <p>a blog by cat æscling</p>
+ </header>
+
+ <article data-sblg-article="1"></article>
+
+<!--
+i can't currently get sblg -C to work purropurrly, so don't do this fur now
+ <nav id="article-nav">
+ <ul>
+ <li><a href="${sblg-first-stripbase}.xhtml"><< furst</a></li>
+ <li><a href="${sblg-prev-stripbase}.xhtml">< purrevious</a></li>
+ <li><a href="${sblg-next-stripbase}.xhtml">next ></a></li>
+ <li><a href="${sblg-last-stripbase}.xhtml">last >></a></li>
+ </ul>
+ </nav>
+-->
+EOF
+
+cat template/common/footer.xhtml.template.fragment
+++ /dev/null
-<!DOCTYPE html>
-
-<html lang="en-X-catspeak" xml:lang="en-X-catspeak"
- xmlns="http://www.w3.org/1999/xhtml">
- <head prefix="og: http://ogp.me/ns#">
- <meta charset="utf-8" />
- <meta content="width=device-width, initial-scale=1.0"
- name="viewport" />
- <link href="/atom.xml" rel="alternate" />
- <meta content="${sblg-titletext}: of smoke and æsc"
- property="og:title" />
- <title>${sblg-titletext}: of smoke and æsc</title>
-
- <style>
-html {
- font-family: serif;
- font-size: 14pt;
- line-height: 1.28;
- color: #F0B2D8;
- background: #3B3B3B;
-}
-
-body {
- background: #1F4505;
- max-width: 72ch;
- margin: 0 auto;
- padding: 1rem;
- margin-top: 2rem;
- padding: 1rem;
- filter: drop-shadow(.5rem .5rem 0.064rem #1c1c1c);
- border: outset 4px #592846;
-}
-
-h1 {
- font-family: sans-serif;
- font-size: 18pt;
-}
-
-article,
-footer {
- border-top: solid 1px #E63CA4;
-}
-
-footer {
- font-size: 10pt;
-}
-
-article h1 {
- font-size: 16pt;
-}
-
-a,
-a:visited {
- color: #31B9DB;
-}
-
-a:active,
-a:hover,
-a:focus {
- background: #31B9DB;
- color: #1F4505;
-}
-
-header {
- font-size: 12pt;
-}
-
-header p,
-time {
- font-style: italic;
-}
-
-header,
-footer {
- text-align: center;
-}
- </style></head>
-
- <body>
- <header>
- <h1><a href="/">of smoke and æsc</a></h1>
-
- <p>a blog by cat æscling</p>
- </header>
-
- <article data-sblg-article="1"></article>
-
- <footer>
- <p>licensed under <a
- href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA
- 4.0</a></p>
- </footer>
- </body>
-</html>
--- /dev/null
+ <footer>
+ <p>licensed under <a
+ href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA
+ 4.0</a></p>
+ </footer>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+
+<html lang="en-X-catspeak" xml:lang="en-X-catspeak"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <head prefix="og: http://ogp.me/ns#">
+ <meta charset="utf-8" />
+ <meta content="width=device-width, initial-scale=1.0"
+ name="viewport" />
+ <link href="/atom.xml" rel="alternate" type="application/atom+xml"
+ />
--- /dev/null
+ <style>
+html {
+ font-family: serif;
+ font-size: 14pt;
+ line-height: 1.28;
+ color: #F0B2D8;
+ background: #3B3B3B;
+}
+
+body {
+ background: #1F4505;
+ max-width: 72ch;
+ margin: 0 auto;
+ padding: 1rem;
+ margin-top: 2rem;
+ padding: 1rem;
+ filter: drop-shadow(.5rem .5rem 0.064rem #1c1c1c);
+ border: outset 4px #592846;
+}
+
+h1 {
+ font-family: sans-serif;
+ font-size: 18pt;
+}
+
+article header,
+nav,
+footer {
+ border-top: solid 1px #E63CA4;
+}
+
+footer {
+ font-size: 10pt;
+}
+
+a,
+a:visited {
+ color: #31B9DB;
+}
+
+a:active,
+a:hover,
+a:focus {
+ background: #31B9DB;
+ color: #1F4505;
+}
+
+header {
+ font-size: 12pt;
+}
+
+header p,
+time {
+ font-style: italic;
+}
+
+header,
+footer {
+ text-align: center;
+}
+
+#article-nav {
+ text-align: center;
+}
+
+#article-nav ul li {
+ display: inline;
+ padding: 1rem;
+}
+ </style></head>
+
+ <body>
+ <header>
--- /dev/null
+#!/bin/sh -e
+
+cat template/common/intro.xhtml.template.fragment
+
+cat <<'EOF'
+ <meta content="/" property="og:url" />
+ <meta content="of æsc and smoke: a blog by cat æscling" property="og:title" />
+ <title>of æsc and smoke: a blog by cat æscling</title>
+EOF
+
+cat template/common/style-body.xhtml.template.fragment
+
+cat <<'EOF'
+ <h1>of æsc and smoke</h1>
+
+ <p>a blog by cat æscling</p>
+ </header>
+
+ <nav data-sblg-nav="1"></nav>
+EOF
+
+cat template/common/footer.xhtml.template.fragment
+++ /dev/null
-<!DOCTYPE html>
-
-<html lang="en-X-catspeak" xml:lang="en-X-catspeak"
- xmlns="http://www.w3.org/1999/xhtml">
- <head prefix="og: http://ogp.me/ns#">
- <meta charset="utf-8" />
- <meta content="width=device-width, initial-scale=1.0"
- name="viewport" />
- <meta content="/" property="og:url" />
- <meta content="of smoke and æsc" property="og:title" />
- <link href="/atom.xml" rel="alternate" />
- <title>of smoke and æsc: a blog by cat æscling</title>
-
- <style>
-html {
- font-family: serif;
- font-size: 14pt;
- line-height: 1.28;
- color: #F0B2D8;
- background: #3B3B3B;
-}
-
-body {
- background: #1F4505;
- max-width: 72ch;
- margin: 0 auto;
- padding: 1rem;
- margin-top: 2rem;
- padding: 1rem;
- filter: drop-shadow(.5rem .5rem 0.064rem #1c1c1c);
- border: outset 4px #592846;
-}
-
-h1 {
- font-family: sans-serif;
- font-size: 18pt;
-}
-
-nav,
-footer {
- border-top: solid 1px #E63CA4;
-}
-
-footer {
- font-size: 10pt;
-}
-
-a,
-a:visited {
- color: #31B9DB;
-}
-
-a:active,
-a:hover,
-a:focus {
- background: #31B9DB;
- color: #1F4505;
-}
-
-header {
- font-size: 12pt;
-}
-
-header p {
- font-style: italic;
-}
-
-header,
-footer {
- text-align: center;
-}
- </style></head>
-
- <body>
- <header>
- <h1>of smoke and æsc</h1>
-
- <p>a blog by cat æscling</p>
- </header>
-
- <nav data-sblg-nav="1"></nav>
-
- <footer>
- <p>licensed under <a
- href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA
- 4.0</a></p>
- </footer>
- </body>
-</html>