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

Why index title had repeat ? #7389

Closed
3 of 7 tasks
lkzwc opened this issue May 10, 2022 · 6 comments
Closed
3 of 7 tasks

Why index title had repeat ? #7389

lkzwc opened this issue May 10, 2022 · 6 comments
Labels
closed: duplicate This issue or pull request already exists in another issue or pull request

Comments

@lkzwc
Copy link

lkzwc commented May 10, 2022

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

image
image

the environment is
"@docusaurus/core": "2.0.0-beta.18",
"@docusaurus/plugin-sitemap": "^2.0.0-beta.20",
"@docusaurus/preset-classic": "2.0.0-beta.18",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.1.1",
"prism-react-renderer": "^1.3.1",
"react": "^17.0.2",
"react-dom": "^17.0.2"

Reproducible demo

No response

Steps to reproduce

no

Expected behavior

expect one title

Actual behavior

actual show title and title by '|'

Your environment

url: https://lkthblog.vercel.app/
"@docusaurus/core": "2.0.0-beta.18",
"@docusaurus/plugin-sitemap": "^2.0.0-beta.20",
"@docusaurus/preset-classic": "2.0.0-beta.18",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.1.1",
"prism-react-renderer": "^1.3.1",
"react": "^17.0.2",
"react-dom": "^17.0.2"

Self-service

  • I'd be willing to fix this bug myself.
@lkzwc lkzwc 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 May 10, 2022
@Josh-Cena Josh-Cena added closed: question This issue is a user error/misunderstanding. closed: working as intended This issue is intended behavior, there's no need to take any action. and removed 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 May 10, 2022
@Josh-Cena
Copy link
Collaborator

Duplicate of #5878

@Josh-Cena Josh-Cena marked this as a duplicate of #5878 May 10, 2022
@Josh-Cena Josh-Cena added closed: duplicate This issue or pull request already exists in another issue or pull request and removed closed: question This issue is a user error/misunderstanding. closed: working as intended This issue is intended behavior, there's no need to take any action. labels May 10, 2022
@Josh-Cena
Copy link
Collaborator

Josh-Cena commented May 10, 2022

It's like that because we never got around to implement heuristics of when to show only the site title. You can ignore the title prop entirely to not show duplicated title. Just use <Layout description="你的描述"></Layout>

@lkzwc
Copy link
Author

lkzwc commented May 10, 2022

It's like that because we never got around to implement heuristics of when to show only the site title. You can ignore the title prop entirely to not show duplicated title. Just use <Layout description="你的描述"></Layout>

if i delete title of layout ,the index title is none ?? it will be show description
image

@lkzwc
Copy link
Author

lkzwc commented May 10, 2022

@Josh-Cena

@lkzwc
Copy link
Author

lkzwc commented May 10, 2022

image
源码当中这个逻辑整错了吧

@Josh-Cena
Copy link
Collaborator

这是另外一个 bug,会在 #7362 中修复。

@Josh-Cena Josh-Cena closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed: duplicate This issue or pull request already exists in another issue or pull request
Projects
None yet
Development

No branches or pull requests

2 participants