-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[doc-links] Ensure correct doc links from main branch #116652
Conversation
Until all repos are switched over to using a "main" branch, all the doc URLs are still published as the "master" version. This also gives us a single place to change once we start publishing them as "main".
Pinging @elastic/kibana-docs (Team:Docs) |
This should effectively be a no-op for as long as the branch is called "master", so I'm not sure how (if?) to test this. This should be removed when elastic/docs#2264 is addressed. |
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, Greg!
const DOC_LINK_VERSION = injectedMetadata.getKibanaBranch(); | ||
const kibanaBranch = injectedMetadata.getKibanaBranch(); | ||
// Documentation for `main` branches is still published at a `master` URL. | ||
const DOC_LINK_VERSION = kibanaBranch === 'main' ? 'master' : kibanaBranch; |
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.
Theoretically, we could just hard-code DOC_LINK_VERSION
to "main", since we're not going to backport this change, and should ideally remove it before new versions get branched off of this.
💚 Build Succeeded
Metrics [docs]Page load bundle
To update your PR or re-run it, just comment with: |
Summary
Until all repos are switched over to using a "main" branch, all the doc
URLs are still published as the "master" version. This also gives us a
single place to change once we start publishing them as "main".
For maintainers