Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display date of update in post header #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

s4b7r
Copy link

@s4b7r s4b7r commented Oct 2, 2021

I looked for a way to display the 'update' date of an edited post. Didn't take too long to implement it. If you like, you can pull this upstream.

Copy link

@skyn1x0 skyn1x0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<p class="post-meta">
    {% if page.date-updated %}
    <time datetime="{{ page.date }}">Published {{ page.date | date: site.theme_config.date_format }}</time>
    <br><time datetime="{{ page.date-updated }}">Updated {{ page.date-updated | date: site.theme_config.date_format }}</time>
    {% else %}
    <time datetime="{{ page.date }}">{{ page.date | date: site.theme_config.date_format }}</time>
    {% endif %}
  </p>

I thought it looked a bit weird having text beside the updated date and no text beside the published date, so here's a change for that. Might just be my personal preference, but figured it might be useful to someone else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants