-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
<title> tag is not generated correctly (especially in a custom theme) #450
Comments
Amazing, thank you @ulivz! |
@johndigital I saw you resolved this problem and I'm having the exact same problem as specified in #1232 I can't seem to get this to work and thought I'd see if you had to take any additional steps. If you could share any tips, it would be appreciated. I've tried everything I can think of to get this to work, and I can't determine the problem. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using a custom theme and running the build command, the generated files don't have the correct
<title>
and<meta>
description tags. This seems to also be an issue using the default theme as well, but it's worse with any custom theme.Here is a repo to help replicate: https://github.com/johndigital/vuepress-title-issue
The master branch shows the primary issue with a minimal configuration, alternately here are the steps to replicate:
npm install vuepress -g
echo '# Hello VuePress' > README.md
.vuepress/config.js
and paste the following config into it:vuepress build
In the generated files, the title of 404.html is "VuePress" but I would expect it to be the default "Title from config.js". In this scenario since we are using the default theme the title of index.html is correct.
.vuepress/theme/Layout.vue
and paste the following minimal layout from the guide:vuepress build
The title of both index.html and 404.html in the /dist folder are now set to just "VuePress" rather than the title from the README file or the title from the configuration. The description is also set to an empty string rather than using the description from config.js
This appears to be an issue both when using a global or local installation of vuepress. As demonstrated in the replication repo, the frontmatter titles are ignored as well.
Please let me know if there is other information I can provide to help get this fixed. Per the bug reporting guides, here is all the relevant information about my system:
The text was updated successfully, but these errors were encountered: