using with prerender-spa-plugin is causing title and meta tags to be displayed twice
See original GitHub issueHi, Firstly, thanks for the amazing work you do, hope they decide to make everyone’s life better by making vue-head a standard part of vue soon.
I am not sure this is an issue with vue-head but please forgive me if I am wasting your time.
This issue only happens when live on netlify ( without their prerender option active ), not while being served locally.
the live site shows :
<title>about | anonplayer about | anonplayer</title>
but my component has
head: {
title: {
inner: "about | anonplayer",
separator: ' ',
}, ...
and this happens for every page of my single page app
and this is also happening to meta tags i set using vue-head where there are two sets of the tags i intended to have.
looks like this
I have the default prerender settings :
config.plugins.push(new PrerenderSPAPlugin({
// Required - The path to the webpack-outputted app to prerender.
staticDir: path.join(__dirname, 'dist'),
// Required - Routes to render.
routes: ['/', '/about'].concat(contracts.map(each => `/${each.abi}/${each.contract}`)),
}))
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
using vue-head with prerender-spa-plugin is causing title and ...
using vue-head with prerender-spa-plugin is causing title and meta tags to be displayed twice on netlify · vue.js · single-page-application · vue- ...
Read more >using vue-head with prerender-spa-plugin is causing title and ...
Coding example for the question using vue-head with prerender-spa-plugin is causing title and meta tags to be displayed twice on netlify-Vue.js.
Read more >Fixing the Error "Duplicate Meta Titles" in SEO with Siteimprove
The rel="canonical" tag should be put into the duplicate page and should point to the original page. If the original from our examples...
Read more >How to Fix Duplicate Meta Descriptions and Titles in WordPress
#1 Method: Meta Tags Analyzer. Backstory. I wrote this article back in the days when Google Webmaster Tools (GWT) used to show duplicate...
Read more >How do I fix duplicate meta tags? - Yoast
Google Search Console (former Google Webmaster Tools) reports you to have duplicate meta titles or duplicate meta descriptions. Each URL should have unique ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe that’s what this option is for: https://github.com/ktquez/vue-head#default-custom-title ?
I have following code for title in my index component:
I’m also using prerender-spa-plugin. Title at first is once (when I use show code ctrl+U) but when javascript loads and execute, it double title.
This happen only to prerendered app.
I’m doing something wrong?
Edit 18.02.2019
I think I fixed it with changing 7th line in vue-head.js in node_modules directory from:
to