Skip to content

feat: add last updated date to blog posts #692

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

Merged
merged 22 commits into from
May 29, 2025

Conversation

Pixel998
Copy link
Contributor

@Pixel998 Pixel998 commented Feb 8, 2025

Prerequisites checklist

What is the purpose of this pull request?

The purpose of the pull request is to add a "last updated" date to blog posts.

What changes did you make? (Give an overview)

I added a "last updated" date to each blog post.

localhost_2022_blog_2025_01_eslint-v9 18 0-released_

Related Issues

Fix #612

Is there anything you'd like reviewers to focus on?

Sorry, something went wrong.

Copy link

netlify bot commented Feb 8, 2025

Deploy Preview for pt-br-eslint ready!

Name Link
🔨 Latest commit 92dd741
🔍 Latest deploy log https://app.netlify.com/projects/pt-br-eslint/deploys/68370ae6a44847000895a2bf
😎 Deploy Preview https://deploy-preview-692--pt-br-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Feb 8, 2025

Deploy Preview for ja-eslint ready!

Name Link
🔨 Latest commit 92dd741
🔍 Latest deploy log https://app.netlify.com/projects/ja-eslint/deploys/68370ae67fcf1b0008ac2437
😎 Deploy Preview https://deploy-preview-692--ja-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Feb 8, 2025

Deploy Preview for es-eslint ready!

Name Link
🔨 Latest commit 92dd741
🔍 Latest deploy log https://app.netlify.com/projects/es-eslint/deploys/68370ae61392110008168c09
😎 Deploy Preview https://deploy-preview-692--es-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Feb 8, 2025

Deploy Preview for de-eslint ready!

Name Link
🔨 Latest commit 92dd741
🔍 Latest deploy log https://app.netlify.com/projects/de-eslint/deploys/68370ae6311fa200082a0832
😎 Deploy Preview https://deploy-preview-692--de-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Feb 8, 2025

Deploy Preview for zh-hans-eslint ready!

Name Link
🔨 Latest commit 92dd741
🔍 Latest deploy log https://app.netlify.com/projects/zh-hans-eslint/deploys/68370ae6ee319f0008733036
😎 Deploy Preview https://deploy-preview-692--zh-hans-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Feb 8, 2025

Deploy Preview for fr-eslint ready!

Name Link
🔨 Latest commit 92dd741
🔍 Latest deploy log https://app.netlify.com/projects/fr-eslint/deploys/68370ae655028800080f80b7
😎 Deploy Preview https://deploy-preview-692--fr-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Feb 8, 2025

Deploy Preview for hi-eslint ready!

Name Link
🔨 Latest commit 92dd741
🔍 Latest deploy log https://app.netlify.com/projects/hi-eslint/deploys/68370ae687ad0c000827479a
😎 Deploy Preview https://deploy-preview-692--hi-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Feb 8, 2025

Deploy Preview for new-eslint ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 92dd741
🔍 Latest deploy log https://app.netlify.com/projects/new-eslint/deploys/68370ae6ee319f0008733032
😎 Deploy Preview https://deploy-preview-692--new-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

Thanks for taking a look at this.

Can you move the updated date/time to the left column? It doesn't look very good as another line at the top.

.eleventy.js Outdated
@@ -22,6 +22,7 @@ const path = require("node:path");
const fs = require("node:fs");
const yaml = require("js-yaml");
const { DateTime } = require("luxon");
const { execSync } = require("node:child_process");
Copy link
Member

Choose a reason for hiding this comment

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

Is there not some way built into Eleventy to get the updated date/time? This feels a bit heavy to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Pixel998
Copy link
Contributor Author

Can you move the updated date/time to the left column? It doesn't look very good as another line at the top.

Like so?
eslint org_blog_2025_02_eslint-v9 20 1-released_ (1)

@nzakas
Copy link
Member

nzakas commented Feb 12, 2025

Yes, that looks good. 👍

Copy link
Contributor

@Tanujkanti4441 Tanujkanti4441 left a comment

Choose a reason for hiding this comment

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

Screenshot 2025-02-16 120259

there is no border between the author's detail and last updated date section for small screen size can you fix that?

Also proposal in #612 says

It would enhance the user experience if the last updated date of the blog post were displayed somewhere on the page, allowing users to quickly see when it was last updated, rather than having to scroll down to the bottom of the page to check the update history.

and for small screen sizes we still have to scroll down to the bottom of the page, should we also add this date in header for small screens?

@amareshsm
Copy link
Member

I have a small suggestion regarding the design.

Current design Suggested design
image image

Can we maintain the same format as the other sections in the sidebar? For example, we have the section titles like "Contributors," "Tags," and "Share," followed by their respective content.

@Pixel998
Copy link
Contributor Author

Thanks for the reviews! I appreciate the feedback. I'm happy with the current design and will wait for Nicholas's input before making any changes.

@nzakas
Copy link
Member

nzakas commented Feb 17, 2025

and for small screen sizes we still have to scroll down to the bottom of the page, should we also add this date in header for small screens?

@Tanujkanti4441 no, I don't think that necessary.

@Pixel998 I like @amareshsm's design. He's on our website team so he's a good resource to work with.

@Pixel998
Copy link
Contributor Author

Pixel998 commented Feb 19, 2025

Sounds good. @amareshsm, got a couple of questions for you:

  1. Could you provide the calendar icon, or let me know where I can find it?
  2. The date in your design doesn't match the format of the published date. Could you clarify which format I should use?

@nzakas
Copy link
Member

nzakas commented Feb 19, 2025

We should use the same date format as the publish date. 👍

Just a reminder: I don't think using git to fetch the updated date inside of the build process is the right way to go. That will dramatically slow down the build and we can't guarantee that git will be available everywhere the website is built.

@Pixel998
Copy link
Contributor Author

Pixel998 commented Feb 20, 2025

Closing this for now.

@Pixel998 Pixel998 closed this Feb 20, 2025
@Pixel998 Pixel998 reopened this Apr 16, 2025
@github-project-automation github-project-automation bot moved this from Complete to Evaluating in Triage Apr 16, 2025
@nzakas nzakas requested a review from Tanujkanti4441 April 25, 2025 15:44
@nzakas nzakas moved this from Evaluating to Second Review Needed in Triage Apr 25, 2025
nzakas
nzakas previously approved these changes Apr 25, 2025
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM. Just left one comment about script naming but otherwise seems ready.

Would like another review before merging.

Comment on lines +2 to +11
"2014-01-19-breaking-change-formatter.md": "2022-02-05T06:13:45.000Z",
"2014-01-20-breaking-change-config-file.md": "2022-02-05T06:13:45.000Z",
"2014-01-20-eslint-0.3.0-released.md": "2022-02-05T06:13:45.000Z",
"2014-02-12-eslint-0.4.0-released.md": "2022-02-05T06:13:45.000Z",
"2014-03-03-eslint-0.4.2-released.md": "2022-02-05T06:13:45.000Z",
"2014-03-18-eslint-0.4.3-released.md": "2022-02-05T06:13:45.000Z",
"2014-03-25-eslint-0.4.4-released.md": "2022-02-05T06:13:45.000Z",
"2014-03-29-eslint-0.4.5-released.md": "2022-02-05T06:13:45.000Z",
"2014-04-10-eslint-0.5.0-released.md": "2022-02-05T06:13:45.000Z",
"2014-04-17-eslint-0.5.1-released.md": "2022-02-05T06:13:45.000Z",
Copy link
Member

Choose a reason for hiding this comment

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

Looks like blog posts copied over from the old website repo (https://github.com/eslint/archive-website) will have the update date 2022-02-05, which I think would be misleading. Perhaps we could get the last updated date from the old website repo, or maybe just use the publish date as the last updated date for these posts?

Copy link
Member

Choose a reason for hiding this comment

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

Good catch. 👍 to using the publish date as the last updated date.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps we could get the last updated date from the old website repo

These dates do reflect the last updated dates from the old website repo unless I am misunderstanding something here?

Copy link
Member

Choose a reason for hiding this comment

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

I see, there was a commit eslint/archive-website@5aa1575 that fixed the authors on that date.

Copy link
Member

Choose a reason for hiding this comment

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

Now, I think this raises a question: Does any change to the blog post's source file constitute an update worth showing in the blog post? I think readers would be interested in factual changes to the content, not e.g., authors, labels, etc.., maybe not even fixing small typos in the text. Since we rarely update the content of blog posts, I'd be in favor of manually updating this date rather than automatically in pre-commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My thoughts exactly!

Copy link
Member

Choose a reason for hiding this comment

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

@mdjermanovic what do you think?

Copy link
Member

Choose a reason for hiding this comment

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

Okay, we can always undo the date change directly in the PR if we don't want to modify the date based on the kind of change in the blog post file.

Copy link
Member

Choose a reason for hiding this comment

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

As for the old blog posts, I still think that fixing the authors shouldn't be considered an update that changes the date.

Copy link
Member

Choose a reason for hiding this comment

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

As for the old blog posts, I still think that fixing the authors shouldn't be considered an update that changes the date.

I agree. I think that will be a rare case going forward, so if we can just set those back to the publish date, I think we'll be good to go.

Pixel998 added 2 commits May 8, 2025 17:15
Pixel998 added 2 commits May 19, 2025 00:53
@nzakas
Copy link
Member

nzakas commented May 19, 2025

Ping @mdjermanovic

Pixel998 added 2 commits May 23, 2025 18:43
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM. Would like @mdjermanovic to verify before merging.

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@mdjermanovic mdjermanovic merged commit ab8e85b into eslint:main May 29, 2025
37 checks passed
@github-project-automation github-project-automation bot moved this from Second Review Needed to Complete in Triage May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Suggestion: Add last updated date on blog posts
5 participants