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

Make file extension agnostic and expand the datetime information #18

Merged
merged 10 commits into from
Sep 27, 2023

Conversation

aalexmmaldonado
Copy link
Contributor

Adds the ability to specify supported file types using gitstamp_file_types = ["rst", "md"] in conf.py. (Would close #11.)

Also expands the datetime information to %Y-%m-%d %H:%M:%S %z for additional flexibility with hour and minute.

@aalexmmaldonado aalexmmaldonado marked this pull request as ready for review September 2, 2023 01:05
@jdillard
Copy link
Owner

jdillard commented Sep 2, 2023

Thanks for the PR!

Instead of adding a new gitstamp_file_types config value, I think it would be better to use the native source_suffix. When you use an extension that supports markdown, like myst_parser, it automatically appends ".md", "markdown" to source_suffix, so no additional configuration should be necessary in that case. There is also page_source_suffix available to the template, but I would look into that more to see if it is useful.

I'll have to look over the rest of the PR tomorrow, but I wanted to mention that at first glance.

@aalexmmaldonado
Copy link
Contributor Author

Ahh, I was not aware of this! That would be a better approach. I will implement it soon.

@jdillard jdillard merged commit c10c63d into jdillard:master Sep 27, 2023
2 checks passed
@jdillard
Copy link
Owner

Looks good. Thanks!

@jdillard jdillard changed the title Markdown support Make file extension agnostic and expand the datetime information Sep 27, 2023
@aalexmmaldonado aalexmmaldonado deleted the markdown-support branch September 27, 2023 12:59
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.

not work with markdown files
2 participants