Skip to content

Conversation

@jayaddison
Copy link
Contributor

@jayaddison jayaddison commented Jan 25, 2024

Feature or Bugfix

  • Feature

Purpose

Detail

  • When considering whether to render a file using Jinja, check for either the existing already-supported _t suffix or secondly for the additionally-supported .jinja suffix.
  • These changes currently target version 7.3 of Sphinx, but I'd be fine with waiting until a future version to introduce them.

Relates

@AA-Turner
Copy link
Member

Can we split adding support for .jinja and renaming the internal template files to two PRs?

@jayaddison
Copy link
Contributor Author

Can we split adding support for .jinja and renaming the internal template files to two PRs?

That seems reasonable, yep. I've restored the original template file paths in this branch.

This could be a case where I'd consider rebasing the commits here. It doesn't seem to make a practical difference given that the changes will be squashed, but somehow it feels odd to have two changes that combine into a no-op in a merged PR.

@jayaddison jayaddison marked this pull request as draft February 4, 2024 13:53
@chrisjsewell
Copy link
Member

Definitely agree with this by the way, I was just thinking the other day that I wanted these templates to be compatible with https://marketplace.visualstudio.com/items?itemName=samuelcolvin.jinjahtml
(Haven't reviewed the actual code yet though)

@AA-Turner AA-Turner marked this pull request as ready for review April 17, 2024 04:55
@AA-Turner AA-Turner changed the title Static templates: also support filenames with .jinja suffix Static templates: also support .jinja files Apr 17, 2024
Some filesystems, such as APFS, use case-sensitive filenames, but require files to be named distinctly in a case-insensitive manner.  Without using case-insensitive filename comparison, we risk the possibility that, for example, someone using Linux/Windows could create a template file that works fine on their machine, but that fails when someone else tries to build that project on MacOS.
@AA-Turner AA-Turner merged commit 0806a00 into sphinx-doc:master Apr 23, 2024
@jayaddison jayaddison deleted the issue-11165/support-jinja-suffix branch April 23, 2024 09:49
@jayaddison
Copy link
Contributor Author

Thank you @AA-Turner!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2024
@AA-Turner AA-Turner added this to the 7.4.0 milestone Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants