htmx
htmx copied to clipboard
Proposed PR to website: Add <!DOCTYPE html> to base theme file
Hello,
I am a supporter of HTMX. I noticed that the documentation website seems to be lacking a <!DOCTYPE html>
tag for HTML pages. This is a general best practice to avoid the browser rendering in "quirks mode" https://developer.mozilla.org/en-US/docs/Glossary/Doctype . The lack of this doctype tag came up when I ran a lighthouse test on the page in a chrome browser.
I searched the issues and repository for any mention of quirks mode and saw nothing. I am unaware of any reason this would not work to add. I made the change locally to the theme file and ran the Zola server and was able to browse the website, run examples and more locally with the doctype tag.
Happy to make a PR if this would help, adding a one line addition of the doctype tag to the base file in the theme.
After thinking about this and searching the discord, I find there are references to HTMX working in quirks mode and possibly this omission is intentional to demonstrate that it works in quirks mode. I just didnt know that initially. I would still suggest adding the declaration to the website but making a point that it works in quirks mode if need be.
Who still does quirks mode? I would be all for a doctype.
Htmx is pushing towards 500 issues, which is great because it means people are using it, but also it would be cool to see this fixed.
https://github.com/bigskysoftware/htmx/commit/206912b71d355477377aade60d06ea013c8e5455
This commit by @dz4k Seems to have fixed this! @1cg Thank you for having such a good crew