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

Duplicate Meta Descriptions In Build Output #194

Closed
harlan-zw opened this issue Jan 2, 2021 · 2 comments
Closed

Duplicate Meta Descriptions In Build Output #194

harlan-zw opened this issue Jan 2, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@harlan-zw
Copy link
Contributor

harlan-zw commented Jan 2, 2021

Describe the bug

When you set a custom meta description within the config.js and set a description at a page level using frontmatter, the build output has 2 meta descriptions

To Reproduce

Add a description in the vitepress config

// .vitepress/config.js

module.exports = {
  // ...
  description: 'Hey 👋 I'm building Laravel & Vue projects and would like to share my journey with you.',
  // ...
}

Add a description for a page

// about/index.md

---
title: About
description: "My name's Harlan. I am a full stack developer living and working out of Sydney, Australia."
head:
- - meta
  - name: description
    content: "My name's Harlan. I am a full stack developer living and working out of Sydney, Australia."
---

# {{ $page.title }}

Hey! Thank you for checking out my site 😊

Live example: https://harlanzw.com/about/

Expected behavior

A single meta description should be present, with the description from the page (about.md) taking precedence over the vitepress config description.

System Info

  • vitepress version: 0.10.4
  • vite version: 2.0.0-beta.1
  • Node version: 14.15.1
  • OS version: Linux Mint 20
@harlan-zw harlan-zw added the bug: pending triage Maybe a bug, waiting for confirmation label Jan 2, 2021
@patak-dev
Copy link
Member

There is a fix for this issue in this PR #170

@kiaking kiaking added bug Something isn't working and removed bug: pending triage Maybe a bug, waiting for confirmation labels Feb 5, 2021
kiaking added a commit that referenced this issue Feb 9, 2021
Co-authored-by: Kia King Ishii <kia.king.08@gmail.com>
@kiaking
Copy link
Member

kiaking commented Feb 11, 2021

This is already fixed via #170 🙌

@kiaking kiaking closed this as completed Feb 11, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants