-
I noticed that for docs I can set both a frontMatter For blog posts the behaviour is different, the frontMatter Is this (inconsistent) behaviour intended? In my case, the problem is that the For example:
Should I worry about the SEO limit? If so, is there a solution to adjust the code that generates the |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 13 replies
-
For blog posts, we don't allow You can put |
Beta Was this translation helpful? Give feedback.
-
If the SEO definitions for |
Beta Was this translation helpful? Give feedback.
-
I did some experimentation and decided on a workaround, but it does not cover the Home page and I consider it quite kludgy. I added two
Basically this is to avoid appending the suffix This was not exactly easy, given that the site is actually a collection of 20+ sites, with more than 500 pages. The solution required some sed & awk magic. However, I did not find a workaround for the Home page; I could not add a Any suggestion how to customise the Home page title (actually to remove the site title suffix)? I saw that you have a configuration option to configure the separator used in the title (to a dino!). I think an even more useful configuration option would be to completely disable the suffix. |
Beta Was this translation helpful? Give feedback.
-
I think that now I have an acceptable solution. In case someone has the same problem, here is a recap: DocsI have a set of 20+ documentation webs, for related projects, all generated from the same template. Since sometimes I work with more of them in parallel, I found it necessary to have the project name explicitly mentioned in the documentation pages, for example How to install the xPack GNU Arm Embedded GCC, instead of Install Guide, as the menu & sidebar items read. Using the default Docusaurus logic, the resulting SEO title is How to install the xPack GNU Arm Embedded GCC | xPack GNU Arm Embedded GCC, which is long and redundant. Since docs allow both frontMatter title and H1 headers, I defined the frontMatter With this configuration the page title is the long explicit string and the SEO title was shortened to Install Guide | xPack GNU Arm Embedded GCC. PostsThe blog posts are mainly used to announce releases, and the titles look like xPack GNU AArch64 Embedded GCC v13.3.1-1.1 released, which is the desired string to be displayed in the page, in the Archive, in atom/rss, etc. Using the default Docusaurus logic, the resulting SEO title is xPack GNU AArch64 Embedded GCC v13.3.1-1.1 released | xPack GNU Arm Embedded GCC, which is way too long and redundant. Since for posts currently it is not possible to define separate frontMatter titles and H1 headers, the solution was to add a custom frontMatter With this configuration the page title is the long explicit string and the SEO title was shortened to Version 13.3.1-1.1 released | xPack GNU Arm Embedded GCC. I could not find instructions in the Docusaurus web site how to provide it with MDXComponents, so I imported it in each blog post. The top web site is: It would be really nice for Docusaurus to support both frontMatter titles and H1 headers for blog posts, it would make these use cases simpler. |
Beta Was this translation helpful? Give feedback.
For blog posts, we don't allow
# title
because this would enable Markdown/JSX in it, while we need the title to be a pure string that we can use on other places such as the paginated list, the sidebar, the RSS feed entries... It's a technical constraint we currently have although we might try to solve it later.You can put
<head><title>My SEO title</title></head>
in any MDX file to override the default meta SEO title.