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

fix: date on post is not following dateFormat #234

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

Laborratte5
Copy link
Contributor

Add extra option to change the date format
displayed at the beginning of the single.html

What problem does this PR solve?

The date format at the beginning of post did not follow the dateFormat
config option.

Is this PR adding a new feature?

I added an extra option postDateFormat to set the date format at the beginning of a post.
I added this option because I like the idea of being able to display the date
more verbose at the start of the post. (Moreover this makes it possible
to add this in a backwards compatible manner, by not changing the current
behavior if the postDateFormat option is not defined)

Is this PR related to any issue or discussion?

See #177

PR Checklist

  • I have verified that the code works as described/as intended.
  • This change adds a social icon which has a permissive license to use it.
  • This change does not include any external library/resources.
  • This change does not include any unrelated scripts (e.g. bash and python scripts).
  • I have enabled maintainer edits for this PR.

Add extra option to change the date format
displayed at the beginning of the single.html
Copy link

netlify bot commented Sep 6, 2024

Deploy Preview for hugo-blog-awesome ready!

Name Link
🔨 Latest commit 7a4fcdd
🔍 Latest deploy log https://app.netlify.com/sites/hugo-blog-awesome/deploys/66dc31b3408ba70008c0f830
😎 Deploy Preview https://deploy-preview-234--hugo-blog-awesome.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 site configuration.

@hugo-sid
Copy link
Owner

hugo-sid commented Sep 7, 2024

@Laborratte5 thanks for the improvement.

I don't like the idea of having 2 date formatting options in the config. It can be confusing.

Does it make sense to remove the dateFormat config option (which I suppose isn't used anywhere)?

@Laborratte5
Copy link
Contributor Author

The dateFormat is used to format the date in the post list (or rather postCard.html).
So I would change my PR to use this option instead and remove the postDateFormat option.

@hugo-sid
Copy link
Owner

hugo-sid commented Sep 7, 2024

The dateFormat is used to format the date in the post list (or rather postCard.html). So I would change my PR to use this option instead and remove the postDateFormat option.

Sounds good 👍

Copy link

sonarcloud bot commented Sep 7, 2024

@Laborratte5 Laborratte5 changed the title feat: add option for post date format fix: date on post is not following dateFormat Sep 19, 2024
Copy link
Owner

@hugo-sid hugo-sid left a comment

Choose a reason for hiding this comment

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

Thanks @Laborratte5 for the fix.

@hugo-sid hugo-sid merged commit c95d246 into hugo-sid:main Sep 26, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants