From b03fb7311f1a40f7679f6f124917d972e7c3d60a Mon Sep 17 00:00:00 2001 From: Gabriel Date: Fri, 24 Apr 2020 01:18:23 +0200 Subject: [PATCH] Add default values for config variables (#621) --- _includes/footer-minimal.html | 4 +++- _includes/footer.html | 2 ++ _includes/head.html | 12 +++++++----- _includes/header.html | 6 ++++-- _includes/nav.html | 2 +- css/main.css | 34 +++++++++++++++++----------------- feed.xml | 4 ++++ index.html | 8 +++++--- tags.html | 4 +++- 9 files changed, 46 insertions(+), 30 deletions(-) diff --git a/_includes/footer-minimal.html b/_includes/footer-minimal.html index f3cce3a..af9d2c1 100644 --- a/_includes/footer-minimal.html +++ b/_includes/footer-minimal.html @@ -1,7 +1,9 @@ \ No newline at end of file + diff --git a/_includes/footer.html b/_includes/footer.html index 0d34afd..4198cba 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -25,8 +25,10 @@ {%- endfor -%}

- Posted on {{ post.date | date: site.date_format }} + {% assign date_format = site.date_format | default: "%B %-d, %Y" %} + Posted on {{ post.date | date: date_format }}

@@ -31,9 +32,10 @@ use-site-title: true
{% endif %}
- {{ post.excerpt | strip_html | xml_escape | truncatewords: site.excerpt_length }} + {% assign excerpt_length = site.excerpt_length | default: 50 %} + {{ post.excerpt | strip_html | xml_escape | truncatewords: excerpt_length }} {% assign excerpt_word_count = post.excerpt | number_of_words %} - {% if post.content != post.excerpt or excerpt_word_count > site.excerpt_length %} + {% if post.content != post.excerpt or excerpt_word_count > excerpt_length %} [Read More] {% endif %}
diff --git a/tags.html b/tags.html index 2c1c949..04c1939 100644 --- a/tags.html +++ b/tags.html @@ -3,6 +3,8 @@ layout: page title: 'Tag Index' --- +{% assign date_format = site.date_format | default: "%B %-d, %Y" %} + {%- capture site_tags -%} {%- for tag in site.tags -%} {{- tag | first -}}{%- unless forloop.last -%},{%- endunless -%} @@ -25,7 +27,7 @@ title: 'Tag Index'
{{- post.title -}}
{%- endfor -%}