readthedocs / ext-theme

Read the Docs drop in replacement site templates
2 stars 2 forks source link

Fix up pre-commit config to be useful, add djhtml #217

Closed agjohnson closed 1 year ago

agjohnson commented 1 year ago

This ports some of the changes from the addons/etc repo here to match:

In addition:

I'd view the commits separately to reduce noise:

humitos commented 1 year ago

Run djhtml linter on templates to correct spacing

This is great! I'm always unsure how to indent them! 👍🏼

agjohnson commented 1 year ago

This is great! I'm always unsure how to indent them! 👍🏼

Hah, honestly me too :upside_down_face: I usually just use what vim gives me, but it's way easier with something applying rules. There are many ways to indent HTML, it's definitely not as clear a science like Python is.

I've noticed djhtml is not perfect, and some syntax throws it way off, but it's better than some of the other tools I've tried. This one came recommended, I'm surprised I haven't come across it yet.