Skip to content

Commit

Permalink
Start preparing dates for RSS feed
Browse files Browse the repository at this point in the history
  • Loading branch information
beechnut committed May 31, 2024
1 parent 5bb1eb8 commit 70c4082
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ module.exports = function (config) {
return dateObject(date).toISOString().split('T')[0].split('-').join('/')
});

config.addFilter("toISOString", (date) => {
// TODO: Not sure this is returning exactly the right string, re: datetimes
config.addFilter("date_to_xmlschema", (date) => {
return dateObject(date).toISOString()
});

Expand Down
2 changes: 1 addition & 1 deletion _includes/layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h1 itemprop="name headline">{{ page.title }}</h1>
{% include "post-author.html" context="page" %}
</p>
<p class="margin-top-1">
Published on <time datetime="{{ page.date | toISOString }}" itemprop="datePublished">{{ page.date | date: "%B %-d, %Y" }}</time>
Published on <time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%B %-d, %Y" }}</time>
</p>
{% include "post-tags.html" post_tags=page.tags %}
</header>
Expand Down
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 70c4082

Please sign in to comment.