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

Revisit the datetime definitions in the posts #8

Closed
kokkonisd opened this issue Jan 17, 2023 · 0 comments
Closed

Revisit the datetime definitions in the posts #8

kokkonisd opened this issue Jan 17, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@kokkonisd
Copy link
Owner

Currently, the post files define the date and time on which a post was published in the following way:

  1. By parsing the date out of the name of the file (e.g. YYYY-MM-DD-my-post.md);
  2. By parsing the date key from the post file's frontmatter (if present).

We could have the date key override the date provided in the name of the file, but I can't think of a legit usecase for that (there is no good reason for wanting to have a different date on the filename than the actual date displayed on the site). So what the date key is doing, currently, is providing additional information on the datetime (specifically, time and timezone). That means that you have to re-specify the exact date as the one in the filename, plus the time and the timezone.

This seems redundant, and also annoying (you might want all your posts to be UTC); a better solution would be to get rid of date and have two optional keys, time and timezone, which would provide further information on the post.

As an extra thing, we could potentially allow to define a "default" timezone in the config file; to be examined.

@kokkonisd kokkonisd added the enhancement New feature or request label Jan 17, 2023
@kokkonisd kokkonisd self-assigned this Jan 17, 2023
kokkonisd added a commit that referenced this issue Jan 21, 2023
Instead of redefining the entire date string in the post files and
potentially having conflicts with the filenames, it is simpler to only
allow for extra definitions of the time and timezone instead.
Additionally, the user can set a default timezone in the config file, to
avoid having to type it in on every post.

[#8]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant