Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change the lang attribute on <html> #177

Closed
thibaultmalfoy opened this issue Apr 20, 2018 · 4 comments
Closed

How to change the lang attribute on <html> #177

thibaultmalfoy opened this issue Apr 20, 2018 · 4 comments

Comments

@thibaultmalfoy
Copy link

I've tried to change the lang attribute on <html> using YAML front matter, but I probably miss something because it doesn't work.

This is what I do for each page:

---
lang: fr-FR
---

$page.frontmatter.lang is then equal to fr-FR, but $lang is still en-US.

The only way I've found is to use the locales option in .vuepress/config.js:

locales: {
  "/": {
    lang: "fr-FR"
  }
}

but it's weird, and activate the languages link in the navbar.

@ulivz
Copy link
Member

ulivz commented Apr 20, 2018

Fixed at #180

@thibaultmalfoy
Copy link
Author

Thanks @ulivz!

@ulivz
Copy link
Member

ulivz commented Apr 20, 2018

I found that you reported two different problems,

  1. Prioritize frontmatter's title and lang: fixed at fix: prioritize frontmatter's title, description and lang (close: #177) #180.
  2. Only one locale has been set, but show the activated language dropdown: fixed at fix: Only add language dropdown when there has more than one locale configured. #181.

Thanks!

@thibaultmalfoy
Copy link
Author

Thanks again @ulivz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants