aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_includes/contacts.html12
-rw-r--r--_includes/head.html16
-rw-r--r--_includes/links.html12
-rw-r--r--_includes/posts.html12
-rw-r--r--_layouts/page.html2
-rw-r--r--_layouts/post.html12
6 files changed, 16 insertions, 50 deletions
diff --git a/_includes/contacts.html b/_includes/contacts.html
index 06df563..1389c30 100644
--- a/_includes/contacts.html
+++ b/_includes/contacts.html
@@ -3,17 +3,9 @@
<ul>
{% for contact in site.data.contacts %}
<li>
- {% assign description = contact.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape %}
- {% assign title = contact.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape %}
- {% assign url = contact.url | strip_newlines | strip_html | strip | normalize_whitespace | relative_url | uri_escape %}
-
- <a href="{{ url }}" target="_blank">{{ title }}</a>
+ <a href="{{ contact.url | strip_newlines | strip_html | strip | normalize_whitespace | relative_url | uri_escape }}" target="_blank">{{ contact.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</a>
<span>—</span>
- <span>{{ description }}</span>
+ <span>{{ contact.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</span>
</li>
{% endfor %}
</ul>
-
-{% assign description = "" %}
-{% assign title = "" %}
-{% assign url = "" %}
diff --git a/_includes/head.html b/_includes/head.html
index 9078aad..aa6fb4f 100644
--- a/_includes/head.html
+++ b/_includes/head.html
@@ -1,6 +1,3 @@
-{% assign description = page.description | default: site.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape %}
-{% assign title = page.title | default: site.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape %}
-
<head>
<!-- Meta tags -->
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1, shrink-to-fit=no, width=device-width" />
@@ -11,21 +8,20 @@
<!-- Advanced meta tags -->
{% for tag in site.data.meta_tags %}
- <meta name="{{ tag.name | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}"
- content="{{ tag.content | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" />
+ <meta name="{{ tag.name | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" content="{{ tag.content | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" />
{% endfor %}
<!-- Open Graph -->
- <meta property="og:title" content="{{ title }}" />
- <meta property="og:description" content="{{ description }}" />
+ <meta property="og:title" content="{{ page.title | default: site.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" />
+ <meta property="og:description" content="{{ page.description | default: site.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" />
<meta property="og:type" content="{{ page.layout | replace: 'post', 'article' | replace: 'page', 'website' | default: 'website' }}" />
<meta property="og:image" content="{{ page.image | absolute_url | uri_escape }}" />
<meta property="og:url" content="{{ page.url | absolute_url | uri_escape }}" />
<!-- Title / Description -->
- <meta name="application-name" content="{{ title }}" />
- <meta name="description" content="{{ description }}" />
- <title>{{ title }}</title>
+ <meta name="application-name" content="{{ page.title | default: site.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" />
+ <meta name="description" content="{{ page.description | default: site.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}" />
+ <title>{{ page.title | default: site.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</title>
<!-- CSS -->
<link rel="stylesheet" href="{{ '/assets/css/styles.css' | relative_url | uri_escape }}" />
diff --git a/_includes/links.html b/_includes/links.html
index d301161..e7a2801 100644
--- a/_includes/links.html
+++ b/_includes/links.html
@@ -3,17 +3,9 @@
<ul>
{% for link in site.data.links %}
<li>
- {% assign description = link.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape %}
- {% assign title = link.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape %}
- {% assign url = link.url | strip_newlines | strip_html | strip | normalize_whitespace | relative_url | uri_escape %}
-
- <a href="{{ url }}" target="_blank">{{ title }}</a>
+ <a href="{{ link.url | strip_newlines | strip_html | strip | normalize_whitespace | relative_url | uri_escape }}" target="_blank">{{ link.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</a>
<span>—</span>
- <span>{{ description }}</span>
+ <span>{{ link.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</span>
</li>
{% endfor %}
</ul>
-
-{% assign description = "" %}
-{% assign title = "" %}
-{% assign url = "" %}
diff --git a/_includes/posts.html b/_includes/posts.html
index 6dc0d2b..fee0c31 100644
--- a/_includes/posts.html
+++ b/_includes/posts.html
@@ -3,16 +3,8 @@
<ul>
{% for post in site.posts %}
<li>
- {% assign date = post.date | date: '%d-%m-%Y' | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape %}
- {% assign title = post.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape %}
- {% assign url = post.url | relative_url | uri_escape %}
-
- <a href="{{ url }}">{{ title }}</a>
- (<time datetime="{{ post.date | date_to_xmlschema }}">{{ date }}</time>)
+ <a href="{{ post.url | relative_url | uri_escape }}">{{ post.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</a>
+ (<time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: '%d-%m-%Y' | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</time>)
</li>
{% endfor %}
</ul>
-
-{% assign date = "" %}
-{% assign title = "" %}
-{% assign url = "" %}
diff --git a/_layouts/page.html b/_layouts/page.html
index 01d6fcd..28cdb0f 100644
--- a/_layouts/page.html
+++ b/_layouts/page.html
@@ -4,7 +4,7 @@ layout: default
<main class="container">
<header>
- <h1>{{ page.title | default: site.title | strip_newlines | strip_html| strip | normalize_whitespace | smartify | xml_escape }}</h1>
+ <h1>{{ page.title | default: site.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</h1>
</header>
{{ content }}
diff --git a/_layouts/post.html b/_layouts/post.html
index 9e0a766..7731828 100644
--- a/_layouts/post.html
+++ b/_layouts/post.html
@@ -2,25 +2,19 @@
layout: default
---
-{% assign date = page.date | date: '%Y-%m-%d' | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape %}
-{% assign title = site.title | strip_newlines | strip_html| strip | normalize_whitespace | smartify | xml_escape %}
-
<article class="container">
<small>
<span>Published</span>
- <time datetime="{{ page.date | date_to_xmlschema }}">{{ date }}</time>
+ <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: '%Y-%m-%d' | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</time>
<span>on</span>
- <a href="{{ site.url | absolute_url | uri_escape }}" target="_self">{{ title }}</a>
+ <a href="{{ site.url | absolute_url | uri_escape }}" target="_self">{{ site.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</a>
<span>|</span>
<a href="{{ page.url | absolute_url | uri_escape }}" target="_blank">Permalink</a>
</small>
<header>
- <h1>{{ title }}</h1>
+ <h1>{{ site.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</h1>
</header>
{{ content }}
</article>
-
-{% assign date = "" %}
-{% assign title = "" %}