Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _includes/page__date.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% assign locale = include.locale | default: site.locale %}
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
{% assign date_format = page.date_format | default: site.date_format | default: "%B %-d, %Y" %}
{% if page.last_modified_at %}
<p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ site.data.ui-text[locale].date_label | default: "Updated:" }}</strong> <time class="dt-updated" datetime="{{ page.last_modified_at | date: "%Y-%m-%d" }}">{{ page.last_modified_at | date: date_format }}</time></p>
{% elsif page.date %}
Expand Down
2 changes: 1 addition & 1 deletion _includes/page__meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% assign date = document.date %}
<span class="page__meta-date">
<i class="far {% if include.type == 'grid' and document.read_time and document.show_date %}fa-fw {% endif %}fa-calendar-alt" aria-hidden="true"></i>
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
{% assign date_format = document.date_format | default: site.date_format | default: "%B %-d, %Y" %}
<time datetime="{{ date | date_to_xmlschema }}">{{ date | date: date_format }}</time>
</span>
{% endif %}
Expand Down
4 changes: 3 additions & 1 deletion docs/_docs/05-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,14 @@ defaults:

To disable post date for a post, add `show_date: false` to its YAML Front Matter, overriding what was set in `_config.yml`.

When dates are shown on blog posts or pages, a date format will be chosen to format the date string. The default format is `"%B %-d, %Y"`, which will be displayed like "February 24, 2016". You can choose your date format by referencing this [cheat sheet](https://www.shortcutfoo.com/app/dojos/ruby-date-format-strftime/cheatsheet). For example, use your date format in `_config.yml`.
When dates are shown on blog posts or pages, a date format will be chosen to format the date string. The default format is `"%B %-d, %Y"`, which will be displayed like "February 24, 2016". You can choose your date format by referencing this [cheat sheet](https://www.shortcutfoo.com/app/dojos/ruby-date-format-strftime/cheatsheet). For example, to use ISO 8601 style dates, use this date format:

```yaml
date_format: "%Y-%m-%d"
```

You can set a custom `date_format` for the entire site as a top-level entry in `_config.yml`. You can override the site's `date_format` for a specific post by putting it in the YAML Front Matter, or for groups of posts in the `_config.yml` defaults (just like you can with `show_date`).

### Reading time

Enable estimated reading time snippets with `read_time: true` in YAML Front Matter. `200` has been set as the default words per minute value --- which can be changed by adjusting `words_per_minute:` in `_config.yml`.
Expand Down