Normalise built-in templates

Two main purposes of changes here:

- To make the formatting and indentation of the raw output prettier;
- To simplify the HTML yielded by dropping unnecessary bits.

The 404 changes are a tad more extensive, altering the actual wording to
match conventional stub 404 pages a little more.
This commit is contained in:
Chris Morgan 2019-07-01 12:25:54 +10:00
parent cc01d3f82f
commit 4a10d0497e
8 changed files with 34 additions and 53 deletions

View file

@ -1,10 +1,3 @@
<!doctype html>
<html>
<head>
<title>File Not Found: 404.</title>
</head>
<body>
<h1>Oops!</h1>
<h2>File Not Found: 404.</h2>
</body>
</html>
<title>404 Not Found</title>
<h1>404 Not Found</h1>

View file

@ -1,12 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<title>Redirect</title>
<link rel="canonical" href="{{ url | safe }}" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="0;url={{ url | safe }}" />
</head>
<body>
<p><a href="{{ url | safe }}">Click here</a> to be redirected.</p>
</body>
</html>
<!doctype html>
<meta charset="utf-8">
<link rel="canonical" href="{{ url | safe }}">
<meta http-equiv="refresh" content="0;url={{ url | safe }}">
<title>Redirect</title>
<p><a href="{{ url | safe }}">Click here</a> to be redirected.</p>

View file

@ -8,7 +8,7 @@
<language>{{ config.default_language }}</language>
<atom:link href="{{ feed_url | safe }}" rel="self" type="application/rss+xml"/>
<lastBuildDate>{{ last_build_date | date(format="%a, %d %b %Y %H:%M:%S %z") }}</lastBuildDate>
{% for page in pages %}
{%- for page in pages %}
<item>
<title>{{ page.title }}</title>
<pubDate>{{ page.date | date(format="%a, %d %b %Y %H:%M:%S %z") }}</pubDate>
@ -16,6 +16,6 @@
<guid>{{ page.permalink | escape_xml | safe }}</guid>
<description>{% if page.summary %}{{ page.summary }}{% else %}{{ page.content }}{% endif %}</description>
</item>
{% endfor %}
{%- endfor %}
</channel>
</rss>

View file

@ -1,7 +1,3 @@
<div {% if class %}class="{{class}}"{% endif %}>
<iframe src="https://www.streamable.com/e/{{id}}"
scrolling="no"
frameborder="0"
allowfullscreen mozallowfullscreen webkitallowfullscreen>
</iframe>
<iframe src="https://www.streamable.com/e/{{id}}" scrolling="no" frameborder="0" allowfullscreen mozallowfullscreen webkitallowfullscreen></iframe>
</div>

View file

@ -1,4 +1,3 @@
<div {% if class %}class="{{class}}"{% endif %}>
<iframe src="//player.vimeo.com/video/{{id}}" webkitallowfullscreen mozallowfullscreen allowfullscreen>
</iframe>
<iframe src="//player.vimeo.com/video/{{id}}" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>

View file

@ -1,4 +1,3 @@
<div {% if class %}class="{{class}}"{% endif %}>
<iframe src="https://www.youtube.com/embed/{{id}}{% if autoplay %}?autoplay=1{% endif %}" webkitallowfullscreen mozallowfullscreen allowfullscreen>
</iframe>
<iframe src="https://www.youtube.com/embed/{{id}}{% if autoplay %}?autoplay=1{% endif %}" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>

View file

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for sitemap_entry in entries %}
{%- for sitemap_entry in entries %}
<url>
<loc>{{ sitemap_entry.permalink | escape_xml | safe }}</loc>
{% if sitemap_entry.date %}
{%- if sitemap_entry.date %}
<lastmod>{{ sitemap_entry.date }}</lastmod>
{% endif %}
{%- endif %}
</url>
{% endfor %}
{%- endfor %}
</urlset>

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for sitemap in sitemaps %}
{%- for sitemap in sitemaps %}
<sitemap>
<loc>{{ sitemap }}</loc>
</sitemap>
{% endfor %}
{%- endfor %}
</sitemapindex>