You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
blogTitle is overridden by site title when at site root #10045
Hey OzaklOne thanks for the stackblitz, I was able to repro using your code with few changes, the important part is routeBasePath: "/", because I want the blog to be hosted on root with no docs or pages. I also deleted the src/pages folder
From what I tried and understand, when you are in blog only mode blogTitle is not the title of the page anymore, blogTitle is the title of the page when routeBasePath is not set to '/' because title will take the priority over blogTitle and indeed on the route / of your website you will have title twice so by default 'My blog | My blog'
Activity
[-].[/-][+]blogTitle not working[/+]OzakIOne commentedon Apr 14, 2024
Hello I tried when creating a minimal repo and I can't reproduce your issue
https://stackblitz.com/edit/github-srzyqm?file=docusaurus.config.js
Please provide a minimal repro on stackblitz with what you want as output so we can further assist you
root-io commentedon Apr 14, 2024
Hey OzaklOne thanks for the stackblitz, I was able to repro using your code with few changes, the important part is
routeBasePath: "/",because I want the blog to be hosted on root with no docs or pages. I also deleted the src/pages folderOzakIOne commentedon Apr 15, 2024
From what I tried and understand, when you are in blog only mode
blogTitleis not the title of the page anymore, blogTitle is the title of the page whenrouteBasePathis not set to'/'becausetitlewill take the priority overblogTitleand indeed on the route/of your website you will have title twice so by default'My blog | My blog'slorber commentedon Apr 15, 2024
Yes that looks like we have this historical behavior in the theme:
I'd consider it a bug because that looks wrong to me.
Having a blog homepage at
/does not mean a site only contains a blog. You might have a blog at the root of your site and yet have docs.I'm not sure how we'll fix it yet, but this will likely be done as part of a global siteTitle breaking-change PR where we change other things as well.
In the meantime you can swizzle
BlogListPageMetadataand fix that behavior, use thesiteConfig.titleif you only host a blog.[-]blogTitle not working[/-][+]blogTitle is overridden by site title when at site root[/+]kalyan90 commentedon Oct 3, 2024
@slorber I would like to work on this, can you please help with the expected behaviour?
japj commentedon Mar 3, 2025
I also just ran into this for my site, where a blog is hosted at '/', but it also contains some documentation under '/docs'.
I was expecting "Blog|my site", but got "my site|my site" instead as title.
japj commentedon Mar 3, 2025
I am fairly new to docusaurus and react, but managed to swizzle eject BlogListPage (since BlogListMetadata seems to be part of that): japj/japj.github.io@8283578#diff-a513ae010e0223ea74a6354e97b3df6476835c573e0bfa189283e2f5b3e5c9f5R23
Is this the 'correct' way, or is there a better way to do this?