-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
blogTitle is overridden by site title when at site root #10045
Comments
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 |
Hey OzaklOne thanks for the stackblitz, I was able to repro using your code with few changes, the important part is
|
From what I tried and understand, when you are in blog only mode |
Yes that looks like we have this historical behavior in the theme: function BlogListPageMetadata(props: Props): JSX.Element {
const {metadata} = props;
const {
siteConfig: {title: siteTitle},
} = useDocusaurusContext();
const {blogDescription, blogTitle, permalink} = metadata;
const isBlogOnlyMode = permalink === '/';
const title = isBlogOnlyMode ? siteTitle : blogTitle;
return (
<>
<PageMetadata title={title} description={blogDescription} />
<SearchMetadata tag="blog_posts_list" />
</>
);
} I'd consider it a bug because that looks wrong to me. Having a blog homepage at 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 |
@slorber I would like to work on this, can you please help with the expected behaviour? |
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
blogTitle not working
Someone at the end of this thread seems to have a similar issue: #5119
Reproducible demo
No response
Steps to reproduce
Expected behavior
I want the title of the page to be: "Blog | Foo"
Actual behavior
The blogTitle is not showing, I get the config title twice: "Foo | Foo".
Your environment
Self-service
The text was updated successfully, but these errors were encountered: