From 96c25086b57e6af1fd44eec8f0bcdadce33730a7 Mon Sep 17 00:00:00 2001 From: Bang Jun-young Date: Thu, 15 Aug 2019 03:10:59 +0900 Subject: [PATCH] Add support for customizable date format (#533) * Add support for customizable date format * Add support for customizable date format --- _config.yml | 3 +++ _includes/header.html | 4 ++-- tags.html | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/_config.yml b/_config.yml index 6e765a3..d4a50a8 100644 --- a/_config.yml +++ b/_config.yml @@ -150,6 +150,9 @@ excerpt_length: 50 # and RSS feed title title-separator: "-" +# Ruby Date Format +date_format: "%B %-d, %Y" + # --- Don't need to touch anything below here (but you can if you want) --- # # Output options (more information on Jekyll's site) diff --git a/_includes/header.html b/_includes/header.html index 1fea242..5338f22 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -36,7 +36,7 @@ {% endif %} {% if include.type == "post" %} - Posted on {{ page.date | date: "%B %-d, %Y" }} + Posted on {{ page.date | date: site.date_format }} {% endif %} @@ -61,7 +61,7 @@ {% endif %} {% if include.type == "post" %} - Posted on {{ page.date | date: "%B %-d, %Y" }} + Posted on {{ page.date | date: site.date_format }} {% endif %} diff --git a/tags.html b/tags.html index 1f40c71..b42ef87 100644 --- a/tags.html +++ b/tags.html @@ -25,7 +25,7 @@ title: 'Tag Index'
{{- post.title -}}
{%- endfor -%}