Skip to content

Is it possible to add docs versions to page titles? #10362

Answered by slorber
kumilingus asked this question in Q&A
Discussion options

You must be logged in to vote

Regarding the SEO issue, this has been discussed a bit here: #9049

Unfortunately afaik there's no way to tell Google about almost duplicate pages due to docs versioning. I'm not sure it's a big deal in practice and even former Angular docs (<= v17) had duplicates:


Regarding using different titles per version, you can achieve that by swizzling @theme/DocItem/Metadata and altering the metadata we put in the page for each docs.

Here's an example implementation:

import React from 'react';
import {PageMetadata} from '@docusaurus/theme-common';
import {useDoc, useDocsVersion} from '@docusaurus/plugin-co…

Replies: 1 comment 1 reply

Comment options

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

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