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 produces clean html. For instance, from the example gallery:

What I’m trying to do

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


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: