Skip to content

How to properly configure the title on home page? #9996

Answered by jcubic
jcubic asked this question in Q&A
Discussion options

You must be logged in to vote

So the problem is with the starter code:

export default function Home() {
  const {siteConfig} = useDocusaurusContext();
  return (
    <Layout
      title={`Hello from ${siteConfig.title}`}
      description="Description will go into a meta tag in <head />">
      <HomepageHeader />
      <main>
        <HomepageFeatures />
      </main>
    </Layout>
  );
}

This create title "Hello from ${siteConfig.title} | ${siteConfig.title}" According to #7535 it's not possible to remove | ${siteConfig.title} so you should not use siteConfig.title it the Layout title at all.

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
5 replies
@jcubic
Comment options

@jcubic
Comment options

@OzakIOne
Comment options

@jcubic
Comment options

@OzakIOne
Comment options

Comment options

You must be logged in to vote
1 reply
@slorber
Comment options

Answer selected by jcubic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants