mkdocstrings / python

A Python handler for mkdocstrings.
https://mkdocstrings.github.io/python
ISC License
190 stars 35 forks source link

task: Rename templates to template.html.jinja #151

Closed pawamoy closed 6 months ago

pawamoy commented 7 months ago

Syntax highlighters do not automatically detect that the templates are Jinja templates because they use the .html extension, so they only highlight them as HTML, not Jinja+HTML. I'd like to rename them to use the .html.jinja extension, to enable automatic Jinja+HTML syntax highlighting.

Since templates are overridable, the file names matter, and that's a breaking change. Therefore it needs a deprecation period where we are able to use both the .html and .html.jinja files while emitting warnings when the .html ones are used.

(Also make sure the handler Copier template uses such extensions too)