add introductory blog post for my fsf internship :-)
[~bandali/bndl.org] / header.html
index e371576..78e73d6 100644 (file)
@@ -1,12 +1,21 @@
-ifdef(`__feed',
+include(meta_notes.m4)dnl
+ifdef(`__slug',,`define(__slug, _get(`notes', __id))')dnl
+ifdef(`__feed_atom',
 `<entry xml:base="https://bandali.eu.org">
 <author><name>Amin Bandali</name></author>
-<id>tag:bandali.eu.org,2016:__slug</id>
+<id>tag:bandali.eu.org,atom,notes:__slug</id>
 <published>__pub</published>
 <updated>__upd</updated>
 <link href="https://bandali.eu.org/__slug" rel="alternate" type="text/html"/>
 <title>__title</title>
 <content type="html">',
+`ifdef(`__feed_rss',
+`<item>
+<title>__title</title>
+<link>https://bandali.eu.org/__slug</link>
+<guid isPermaLink="false">tag:bandali.eu.org,rss,notes:__slug</guid>
+<pubDate>syscmd(date "-uRd __pub" | tr -d \\n)</pubDate>
+<description>',
 `<!doctype html>
 <html lang="en">
 <head>
@@ -19,8 +28,10 @@ ifdef(`__feed',
 <link rel="stylesheet" href="/style.css"/>
 <link rel="index" href="/"/>
 ifdef(`__pub',
-`ifdef(`__first',,`<link rel="prev" href="/decr(__id)">')'
-`ifdef(`__last',,`<link rel="next" href="/incr(__id)">')')
+define(__previd, `_get(`notes', decr(__id))')dnl
+define(__nextid, `_get(`notes', incr(__id))')dnl
+`ifelse(__previd,,,`<link rel="prev" href="/__previd">')'dnl
+`ifelse(__nextid,,,`<link rel="next" href="/__nextid">')')dnl
 </head>
 <body>
 <header>
@@ -41,6 +52,6 @@ ifdef(`__pub',
 `<article>
 <header>
 <h1>__title</h1>
-<p>Published on syscmd(date "-d __pub" "+%B %e`,' %Y")`'ifdef(`__upd',`<br/>
-Last updated on syscmd(date "-d __upd" "+%B %e`,' %Y")')</p>
-</header>')')
+<p>Published on syscmd(date "-d __pub" "+%B %e`,' %Y" | tr -d \\n)`'ifdef(`__upd',`<br/>
+Last updated on syscmd(date "-d __upd" "+%B %e`,' %Y" | tr -d \\n)')</p>
+</header>')')')dnl