From 4a10d0497e23e986fe4025a33a30ca6c3fdc1d18 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Mon, 1 Jul 2019 12:25:54 +1000 Subject: [PATCH] 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. --- components/templates/src/builtins/404.html | 11 ++--------- .../templates/src/builtins/internal/alias.html | 18 ++++++------------ components/templates/src/builtins/rss.xml | 18 +++++++++--------- .../src/builtins/shortcodes/streamable.html | 6 +----- .../src/builtins/shortcodes/vimeo.html | 3 +-- .../src/builtins/shortcodes/youtube.html | 3 +-- components/templates/src/builtins/sitemap.xml | 16 ++++++++-------- .../src/builtins/split_sitemap_index.xml | 12 ++++++------ 8 files changed, 34 insertions(+), 53 deletions(-) diff --git a/components/templates/src/builtins/404.html b/components/templates/src/builtins/404.html index f7d50b1a..f8414f0e 100644 --- a/components/templates/src/builtins/404.html +++ b/components/templates/src/builtins/404.html @@ -1,10 +1,3 @@ - - - File Not Found: 404. - - -

Oops!

-

File Not Found: 404.

- - +404 Not Found +

404 Not Found

diff --git a/components/templates/src/builtins/internal/alias.html b/components/templates/src/builtins/internal/alias.html index 1759ae78..54f782e2 100644 --- a/components/templates/src/builtins/internal/alias.html +++ b/components/templates/src/builtins/internal/alias.html @@ -1,12 +1,6 @@ - - - - Redirect - - - - - -

Click here to be redirected.

- - + + + + +Redirect +

Click here to be redirected.

diff --git a/components/templates/src/builtins/rss.xml b/components/templates/src/builtins/rss.xml index aecb42bf..b3ac9a51 100644 --- a/components/templates/src/builtins/rss.xml +++ b/components/templates/src/builtins/rss.xml @@ -8,14 +8,14 @@ {{ config.default_language }} {{ last_build_date | date(format="%a, %d %b %Y %H:%M:%S %z") }} - {% for page in pages %} - - {{ page.title }} - {{ page.date | date(format="%a, %d %b %Y %H:%M:%S %z") }} - {{ page.permalink | escape_xml | safe }} - {{ page.permalink | escape_xml | safe }} - {% if page.summary %}{{ page.summary }}{% else %}{{ page.content }}{% endif %} - - {% endfor %} + {%- for page in pages %} + + {{ page.title }} + {{ page.date | date(format="%a, %d %b %Y %H:%M:%S %z") }} + {{ page.permalink | escape_xml | safe }} + {{ page.permalink | escape_xml | safe }} + {% if page.summary %}{{ page.summary }}{% else %}{{ page.content }}{% endif %} + + {%- endfor %} diff --git a/components/templates/src/builtins/shortcodes/streamable.html b/components/templates/src/builtins/shortcodes/streamable.html index 0fca7f77..d45fa642 100644 --- a/components/templates/src/builtins/shortcodes/streamable.html +++ b/components/templates/src/builtins/shortcodes/streamable.html @@ -1,7 +1,3 @@
- +
diff --git a/components/templates/src/builtins/shortcodes/vimeo.html b/components/templates/src/builtins/shortcodes/vimeo.html index 99760879..0a4298c7 100644 --- a/components/templates/src/builtins/shortcodes/vimeo.html +++ b/components/templates/src/builtins/shortcodes/vimeo.html @@ -1,4 +1,3 @@
- +
diff --git a/components/templates/src/builtins/shortcodes/youtube.html b/components/templates/src/builtins/shortcodes/youtube.html index 5f10206f..26a7fe54 100644 --- a/components/templates/src/builtins/shortcodes/youtube.html +++ b/components/templates/src/builtins/shortcodes/youtube.html @@ -1,4 +1,3 @@
- +
diff --git a/components/templates/src/builtins/sitemap.xml b/components/templates/src/builtins/sitemap.xml index 0c2608a8..fd8ab76b 100644 --- a/components/templates/src/builtins/sitemap.xml +++ b/components/templates/src/builtins/sitemap.xml @@ -1,11 +1,11 @@ - {% for sitemap_entry in entries %} - - {{ sitemap_entry.permalink | escape_xml | safe }} - {% if sitemap_entry.date %} - {{ sitemap_entry.date }} - {% endif %} - - {% endfor %} + {%- for sitemap_entry in entries %} + + {{ sitemap_entry.permalink | escape_xml | safe }} + {%- if sitemap_entry.date %} + {{ sitemap_entry.date }} + {%- endif %} + + {%- endfor %} diff --git a/components/templates/src/builtins/split_sitemap_index.xml b/components/templates/src/builtins/split_sitemap_index.xml index 740e322a..b44801ce 100644 --- a/components/templates/src/builtins/split_sitemap_index.xml +++ b/components/templates/src/builtins/split_sitemap_index.xml @@ -1,8 +1,8 @@ - {% for sitemap in sitemaps %} - - {{ sitemap }} - - {% endfor %} - \ No newline at end of file + {%- for sitemap in sitemaps %} + + {{ sitemap }} + + {%- endfor %} +