htmx icon indicating copy to clipboard operation
htmx copied to clipboard

Proposed PR to website: Add <!DOCTYPE html> to base theme file

Open airbr opened this issue 1 year ago • 2 comments

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.

Screenshot 2023-11-28 at 5 41 16 PM

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.

airbr avatar Nov 29 '23 02:11 airbr

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.

airbr avatar Nov 29 '23 02:11 airbr

Who still does quirks mode? I would be all for a doctype.

svenberkvens avatar Nov 29 '23 19:11 svenberkvens

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.

airbr avatar May 18 '24 04:05 airbr

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

airbr avatar May 18 '24 05:05 airbr