Thanks to Anthhony, I now have a better option 🙇 Using `<script>toggleTheme('dark')</script>` directly from the markdown given it's already availale from the head declaration. As a bonus, we don't mess with user's preferences for other pages.
It appears that some parsers are trying to retrieve the title of a page without striping off HTML comments first. This is stupidily funny :)