From 832ddee1f328d75580c3bc39c48e4b000d2929d6 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Wed, 4 Jan 2017 14:01:44 +0100
Subject: [PATCH] Improve templates.

---
 processor/feed.xml.do                      | 2 +-
 processor/metadata/article.tmpl.do         | 6 ------
 processor/metadata/default.feed_snippet.do | 2 +-
 processor/metadata/index.tmpl.do           | 6 ------
 4 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/processor/feed.xml.do b/processor/feed.xml.do
index eed86ed..2b246a9 100644
--- a/processor/feed.xml.do
+++ b/processor/feed.xml.do
@@ -27,7 +27,7 @@ cat << EOF
 <?xml version="1.0" encoding="utf-8"?>
 <feed xmlns="http://www.w3.org/2005/Atom">
 EOF
-printf "<link href=\"%s\" />\n" "$basepath"
+printf "<link href=\"%s\" rel=\"alternate\" type=\"text/html\" />\n" "$basepath"
 printf "<link href=\"%sfeed.xml\" rel=\"self\" />\n" "$basepath"
 printf "<title type=\"html\">%s</title>\n" "$title"
 printf "<author><name>%s</name></author>\n" "$author"
diff --git a/processor/metadata/article.tmpl.do b/processor/metadata/article.tmpl.do
index e945d5b..8b7e0dc 100644
--- a/processor/metadata/article.tmpl.do
+++ b/processor/metadata/article.tmpl.do
@@ -3,8 +3,6 @@
 if [ ! -f "$1" ]; then
 cat << EOF
 <!DOCTYPE html>
-<html>
-<head>
 <meta charset="UTF-8">
 <style type="text/css">
 h1 { font-size: 2em; }
@@ -17,8 +15,6 @@ header h1 { margin-bottom: 0.1em; }
 header p { margin: 0; }
 </style>
 <title>%BLOG_TITLE% – %ARTICLE_TITLE_ESCAPED%</title>
-</head>
-<body>
 <a href="index.html">%BLOG_TITLE%</a>
 <article>
 <header>
@@ -27,7 +23,5 @@ header p { margin: 0; }
 </header>
 %BODY%
 </article>
-</body>
-</html>
 EOF
 fi
diff --git a/processor/metadata/default.feed_snippet.do b/processor/metadata/default.feed_snippet.do
index 8dca59b..872eacf 100644
--- a/processor/metadata/default.feed_snippet.do
+++ b/processor/metadata/default.feed_snippet.do
@@ -22,6 +22,6 @@ printf "<title type=\"html\">%s</title>\n" "$title"
 printf "<id>urn:uuid:%s</id>\n" "$uuid"
 printf "<updated>%s</updated>\n" "$lastmod_rfc3339"
 printf "<published>%s</published>\n" "$published_rfc3339"
-printf "<link href=\"%s%s\" />\n" "$(get_basepath)" "${html_file}"
+printf "<link href=\"%s%s\" rel=\"alternate\" type=\"text/html\" />\n" "$(get_basepath)" "${html_file}"
 printf "<content type=\"html\">\n%s\n</content>\n" "$body"
 printf "</entry>\n"
diff --git a/processor/metadata/index.tmpl.do b/processor/metadata/index.tmpl.do
index 5befb4f..67cebb2 100644
--- a/processor/metadata/index.tmpl.do
+++ b/processor/metadata/index.tmpl.do
@@ -3,22 +3,16 @@
 if [ ! -f "$1" ]; then
 cat << EOF
 <!DOCTYPE html>
-<html>
-<head>
 <meta charset="UTF-8">
 <style type="text/css">
 h1 { font-size: 2em; }
 </style>
 <link rel="alternate" type="application/rss+xml" title="atom feed" href="feed.xml" />
 <title>%BLOG_TITLE%</title>
-</head>
-<body>
 <h1>%BLOG_TITLE%</h1>
 <p><a href="feed.xml">feed</a></p>
 <ul>
 %INDEX%
 </ul>
-</body>
-</html>
 EOF
 fi
-- 
2.30.2