-
Notifications
You must be signed in to change notification settings - Fork 3.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
Update links #11923
Closed
Closed
Update links #11923
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.
I literally do not understand how there is any difference between specifying
latest
in the URL and specifyinglatest
as the <LOKI_VERSION>. It's still "latest".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.
Because these docs will also be in
next
and then they will link tolatest
instead ofnext
.And when you release the next version of Loki, the previous docs will also link to
latest
instead of linking within the current version.You can choose to not use the
<LOKI_VERSION>
syntax but it will mean that you need to update your links as part of every release and it will negatively impact backporting.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.
Trying to think this through.... Going on what is currently documented in the Writers Toolkit, if the root
_index/md
file hasLOKI_VERSION: latest
then you still have the same problem of the links innext
pointing tolatest
.It isn't documented, but for links to resolve correctly wouldn't you need the following?
Latest release (Loki 2.9) ->
_index/md
file hasLOKI_VERSION: latest
?Or even better, root
_index/md
file hasLOKI_VERSION: 2.9
?Main branch -> root
_index/md
file hasLOKI_VERSION: next
?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.
https://grafana.com/docs/writers-toolkit/write/shortcodes/#about-version-substitution
If you don't set the front matter, the version is inferred from the page's URL
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.
The front matter override is primarily there so that other projects can specify the version of the documentation they are interested in linking to. For example, Grafana Cloud sets
GRAFANA_VERSION: next
so that all links to Grafana documentation go to thenext
version. The Mimir helm chart setsMIMIR_DOCS_VERSION
tov2.10.x
so that they can update a single place when the Mimir helm chart is updated to be compatible with a different version of Mimir and then all links point to the correct version of the Mimir docs.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.
The way that the Writers Toolkit is currently written tells you to set the value for the version in the root _index.md file. I would never have guessed that that was an optional step.
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.
PRs are always welcome