chiark / gitweb /
theme: group all the <link> elements together in <head>.
authorVladimír Vondruš <mosra@centrum.cz>
Sun, 10 Dec 2017 14:40:56 +0000 (15:40 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Mon, 11 Dec 2017 01:48:25 +0000 (02:48 +0100)
My OCD is happy.

pelican-theme/templates/archives.html
pelican-theme/templates/base.html
pelican-theme/templates/base_blog_section.html
pelican-theme/templates/page.html

index 7ae981dba4a382bf23a7483545cd9ca971ff25bc..bbcab8e7aa903afaad1a1ca66c364d29b418a435 100644 (file)
@@ -1,14 +1,13 @@
 {% extends "base_blog.html" %}
 
-{% block head %}
-  {{- super() -}}
+{% block head_links %}
   {% if articles_page and articles_page.has_previous() %}
   <link rel="prev" href="{{ articles_previous_page.url|format_siteurl }}" />
   {% endif %}
   {% if articles_page and articles_page.has_next() %}
   <link rel="next" href="{{ articles_next_page.url|format_siteurl }}" />
   {% endif %}
-{% endblock head %}
+{% endblock head_links %}
 
 {% block content %}
     <div class="m-col-m-10">
index f5335ae34ef5ddc85b3079bac4142778d09164ae..70042623372dd2194cd78f8a11384e04547ca7e1 100644 (file)
@@ -7,16 +7,18 @@
   {% for href in M_CSS_FILES %}
   <link rel="stylesheet" href="{{ href|format_siteurl|e }}" />
   {% endfor %}
-  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-  {% if M_THEME_COLOR %}
-  <meta name="theme-color" content="{{ M_THEME_COLOR }}" />
-  {% endif %}
+  {% block head_links %}
+  {% endblock head_links %}
   {% if FEED_ALL_ATOM_URL %}
   <link href="{{ FEED_ALL_ATOM_URL|format_siteurl }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }}" />
   {% endif %}
   {% if CATEGORY_FEED_ATOM_URL and category %}
   <link href="{{ CATEGORY_FEED_ATOM_URL|format(category.slug)|format_siteurl }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} | {{ category }}" />
   {% endif %}
+  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+  {% if M_THEME_COLOR %}
+  <meta name="theme-color" content="{{ M_THEME_COLOR }}" />
+  {% endif %}
   {% endblock head %}
 </head>
 <body>
index 0f8d84325b055bfdf5901ce908233baf9a99bb85..194aaf9f4fcb33eb4215df2f1c017b2b5340ec45 100644 (file)
@@ -1,14 +1,13 @@
 {% extends "base_blog.html" %}
 
-{% block head %}
-  {{- super() -}}
+{% block head_links %}
   {% if articles_page.has_previous() %}
   <link rel="prev" href="{{ articles_previous_page.url|format_siteurl }}" />
   {% endif %}
   {% if articles_page.has_next() %}
   <link rel="next" href="{{ articles_next_page.url|format_siteurl }}" />
   {% endif %}
-{% endblock head %}
+{% endblock head_links %}
 
 {% block content %}
     <div class="m-col-m-10">
index c50826dafed8887ab49c6ea207198f5c8b374eb6..935b39990b8e4b759425f78fc71a29476c7bda06 100644 (file)
   <meta name="twitter:card" content="summary" />
   {% endif %}
   <meta property="og:type" content="website" />
+{% endblock %}
+
+{% block head_links %}
+  {{- super() -}}
   {% if page.css %}
   {% set styles = page.css.strip().split('\n') %}
   {% for style in styles %}