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

Implement 'sort publishday' support for org-header #78

Merged
merged 3 commits into from
Sep 28, 2023

Conversation

ttybitnik
Copy link
Contributor

Hi @masasam.

Currently, sort publishday feature doesn't work with easy-hugo-org-header.

This PR suggests adding support for that by extending the initial part of the regex inside easy-hugo--publishday-alist and easy-hugo--draft-publishday-alist functions.

Basically, these changes optionally match the org-header #+DATE: field, while maintaining the previous matches.

I'm also suggesting removing the #+PUBLISHDATE field from the org template, since the #+DATE field takes precedence over it when both are set.

This way the org-header will have the same fields as the other archetypes. Additionally, we prevent any possible confusion with the sort publishday feature as well, which works through the date field.

Tested locally and worked fine 👍

@masasam masasam merged commit f1281c8 into masasam:master Sep 28, 2023
@masasam
Copy link
Owner

masasam commented Sep 28, 2023

Hi @ttybitnik .
Thank you for PR.
I've merged.
This is very cool!

@ttybitnik ttybitnik deleted the feat/sort-org branch September 28, 2023 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants