question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Customize page title per plugin instance - avoid duplicated page title

See original GitHub issue

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

By default, the landing page name repeats itself, i.e. “Auth with Caddy | Auth with Caddy”.

image

Steps to reproduce

Please see the landing page of https://authp.github.io/

Expected behavior

The page name should not repeat, i.e. be “Auth with Caddy”.

Actual behavior

The name repeats itself “Auth with Caddy | Auth with Caddy”.

image

Your environment

Reproducible demo

No response

Self-service

  • I’d be willing to fix this bug myself.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Josh-Cenacommented, Nov 4, 2021

You can omit the title field in the home page layout:

export default function home() {
  return (
    // Don't add the title here
    <Layout>
      {/* ... */}
    <Layout>
  )
}

And I do think there’s something we can do: check if site title is equal to page title, and do not duplicate if that’s the case:

https://github.com/facebook/docusaurus/blob/cbcaa52f88cb702a3712c2b4c19b02225f975ea9/packages/docusaurus-theme-common/src/utils/generalUtils.ts#L12-L14

0reactions
Sas2kcommented, Oct 1, 2022

yeah same here (Not to NecroPost)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Avoiding "Duplicate Page Title" and "Duplicate Page Content"
Changing the title tag each time can lead to very long title tags, and it doesn't address the problem of duplicate page content....
Read more >
Fixing the Error "Duplicate Meta Titles" in SEO with Siteimprove
You should avoid duplicate page titles (meta titles) on your website because the more duplicate content and duplicate page titles (meta titles) ...
Read more >
How to Fix Duplicate Meta Descriptions and Titles in WordPress
The duplicate meta tags on posts/pages can be avoided by entering unique meta tags in SEO plugin meta-tag fields of individual posts/pages. Now ......
Read more >
How to fix URLs with duplicate page titles - Sitechecker
To address the issue, make sure to rewrite duplicate titles where needed so that every page on your site has a unique title...
Read more >
How to remove the duplicate meta title and meta description ...
Search for 'Hide title' or 'Hide page and post titles ' plugin in plug-in option · Click 'Install Now' · Activate it. ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found