-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
feat(v2): Add themeConfig.noIndex option #3528 #3573
feat(v2): Add themeConfig.noIndex option #3528 #3573
Conversation
Deploy preview for docusaurus-2 ready! Built without sensitive environment variables with commit 691b703 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, looks like a good start.
Instead of adding the noindex meta from themes code, what about injecting the tag in a generic way directly in core (like, through the SSR template). This way we are sure that this feature work consistently across all themes, including themes built by users/community
Also, we have a migration cli. If v1 had the noIndex option, that would be nice if running the migration cli did output a v2 website also having the noIndex option. You can test this migration with yarn test:v1Migration:migrate
Added some code comments too.
ef6ab4b
to
20f75e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just need to remove the noIndex setup for development mode and good to merge, thanks
packages/docusaurus/src/client/templates/index.html.template.ejs
Outdated
Show resolved
Hide resolved
dd504a5
to
cc0d06e
Compare
cc0d06e
to
691b703
Compare
Thanks @hamzahamidi , that looks nice ;) |
Motivation
This PR is intended to add the noIndex option which was present in V1: https://docusaurus.io/docs/en/site-config#noindex-boolean
More details in the correspondent issue #3528
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
The feature is to add a noIndex option in docusaurus.config.js. If true
<meta name="robots" content="noindex" />
will be added to the template.
Related PRs