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

The title_meta field in doc front matter is ignored #10878

Open
3 of 7 tasks
MisterFISHUP opened this issue Jan 29, 2025 · 0 comments
Open
3 of 7 tasks

The title_meta field in doc front matter is ignored #10878

MisterFISHUP opened this issue Jan 29, 2025 · 0 comments
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@MisterFISHUP
Copy link
Contributor

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

The title_meta field, as documented in the docs, should allow overriding frontMatter.title for SEO purposes. However, it doesn't work for doc pages, while it does work correctly for blog posts.

Reproducible demo

No response

Steps to reproduce

Create a new doc page with the following front matter

---
title: Visible Title
title_meta: SEO Title
---

Check the page's title in the browser or inspect the meta tags.

Expected behavior

The title should use title_meta instead of title, as described in the docs:

Permits to override frontMatter.title when the displayed title and SEO title should be different.

Actual behavior

The title_meta field is ignored, and the <title> tag or og:title still use title instead.

Your environment

No response

Self-service

  • I'd be willing to fix this bug myself.
@MisterFISHUP MisterFISHUP added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Jan 29, 2025
MisterFISHUP added a commit to MisterFISHUP/docusaurus that referenced this issue Jan 29, 2025
@slorber slorber removed the status: needs triage This issue has not been triaged by maintainers label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
Development

No branches or pull requests

2 participants