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

meta data is doubled/tripled at runtime #777

Closed
codeofsumit opened this issue Aug 28, 2018 · 3 comments · Fixed by #2164
Closed

meta data is doubled/tripled at runtime #777

codeofsumit opened this issue Aug 28, 2018 · 3 comments · Fixed by #2164
Labels
topic: config Relates to VuePress config type: enhancement Request to enhance an existing feature

Comments

@codeofsumit
Copy link

Might be related to the closed issue #665.

It was fixed for the description tag - the issue seems to persist for other meta tags:

// config.js
  head: [
    ['meta', { name: 'twitter:card', content: 'summary_large_image' }],
    ['meta', { name: 'twitter:site', content: '@TweetsOfSumit' }],
    ['meta', { name: 'twitter:creator', content: '@TweetsOfSumit' }],
    ['meta', { property: 'og:type', content: 'article' }],
    ['meta', { property: 'og:title', content: 'Raum.sh' }],
    ['meta', { property: 'og:site_name', content: 'Raum.sh' }],
    ['meta', { property: 'og:url', content: 'https://raum.sh' }],
    [
      'meta',
      {
        property: 'og:image',
        content: 'https://raumsh-idpjzzfqhw.now.sh/images/speaking.jpg',
      },
    ],
  ],
---
# Markdown Front Matter
layout: Post
published: 2018-08-07
title: Blog is online 🙋‍♂️
meta:
  - property: og:title
    content: Blog is online 🙋‍♂️
  - name: description
    content: I finally decided to use VuePress as a blog engine.
  - name: keywords
    content: Web Developer Developer Relations Development Blog
---

(yup, social meta tags are a bit of a chaos but that's a different issue)

Output:

  <title>Blog is online 🙋‍♂️ | Raum.sh</title>
  <meta name="description" content="I finally decided to use VuePress as a blog engine.">
  <meta name="twitter:card" content="summary_large_image">
  <meta name="twitter:site" content="@TweetsOfSumit">
  <meta name="twitter:creator" content="@TweetsOfSumit">
  <meta property="og:type" content="article">
  <meta property="og:title" content="Raum.sh">
  <meta property="og:site_name" content="Raum.sh">
  <meta property="og:url" content="https://raum.sh">
  <meta property="og:image" content="https://raumsh-idpjzzfqhw.now.sh/images/speaking.jpg">
  <meta name="title" content="Blog is online 🙋‍♂️">
  <meta property="og:title" content="Blog is online 🙋‍♂️">
  <meta name="keywords" content="Web Developer Developer Relations Development Blog">

Demo:
https://raum.sh/blog/BlogLaunch.html

Here, the meta tag og:title is present three times.

@codeofsumit codeofsumit changed the title meta data is doubled at runtime meta data is doubled/tripled at runtime Aug 28, 2018
@ulivz ulivz added type: enhancement Request to enhance an existing feature topic: config Relates to VuePress config labels Aug 29, 2018
@fengkuangdexiaomifeng
Copy link

The blame-it-on-Lehman story leads to a dangerous complacency

@lorisleiva
Copy link

👋 Same problem here. I've created an issue on my vuepress seo plugin that demonstrates this duplication.

screenshot 2019-02-02 at 11 21 42

In production, the bottom batch of meta tags are updated when we switch pages but the top batch stays static and matches the page that we originally loaded.

I am using [email protected]. I hope this helps.

@samanthaming
Copy link

I'm having the same problem too @lorisleiva 😣. I'm setting the metadata in my own custom plugin, programmatically setting the frontmatter object. Hope this get resolved 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: config Relates to VuePress config type: enhancement Request to enhance an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants