Language tag to <html> tag while publishing

Things I have tried

I tried to find a way to add language tag (in the html head part), like this:
< !DOCTYPE html>
< html lang=fi>
< head>

to published pages, and either it is not possible or I can not hack it myself there.

Actually, this is the only thing the W3 validator complains about, otherwise publish.obsidian.md produces clean html. For instance, from the example gallery:

https://validator.w3.org/nu/?doc=https%3A%2F%2Fjoschuasgarden.com%2F%E2%9C%8C%EF%B8%8F%2BWelcome

What I’m trying to do

The publishing system could scan the document for language hashtags, for instance like this:

#langen
#langfi

and add the language tag in the second line of the html document:
< !DOCTYPE html>
< html lang=fi> (or en, de, etc. respectively)
< head>

1 Like

Would be great if we could even control that, using a

lang: 'de'

YAML frontmatter entry. This would also make it more compatible with Pandoc, since that reads it, too.

Might also make a good search for bilinguals like me, that write notes in several languages. :wink:

2 Likes