Skip to content
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 docs/shared shortcode usage to use keyword argument interface #4921

Merged
merged 2 commits into from
Aug 31, 2023

Conversation

jdbaldry
Copy link
Member

@jdbaldry jdbaldry commented Aug 24, 2023

Previously, an empty version was inferred from the relative permalink for the page. Although the behavior was similar to the other version inference done in shortcodes like docs/reference, it did not allow specifying an empty version needed to include content from unversioned documentation.

For consistency with other shortcodes like docs/reference, the docs/shared shortcode version lookup has been replaced with the following behavior:

  1. If version="", use an empty version.
  2. If version="<SOMETHING VERSION>, use version inference as described in https://grafana.com/docs/writers-toolkit/write/shortcodes/#docsreference-shortcode:~:text=The%20path%20to,becomes%20GRAFANA%20CLOUD..
  3. If version="ANYTHING ELSE", use that literal value.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
@jdbaldry
Copy link
Member Author

I'm opening this PR to see how CI handles this given that the image in use in CI has the old docs/shared implementation but the content has the new.

Once the quirks are resolved here, I will open up the PRs to change all the older versions.

Copy link
Contributor

@clayton-cornell clayton-cornell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that covers all current shared use...

@jdbaldry jdbaldry changed the title Use updated version inference for docs/shared shortcode [release-v0.35] Update docs/shared shortcode usage to use keyword argument interface Aug 30, 2023
@jdbaldry jdbaldry changed the title [release-v0.35] Update docs/shared shortcode usage to use keyword argument interface Update docs/shared shortcode usage to use keyword argument interface Aug 30, 2023
@jdbaldry jdbaldry merged commit 1e6dc88 into main Aug 31, 2023
7 of 8 checks passed
@jdbaldry jdbaldry deleted the jdb/2023-08-update-docs/shared-usage branch August 31, 2023 10:00
grafanabot pushed a commit that referenced this pull request Aug 31, 2023
#4921)

* Use updated version inference in all Agent docs

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix doc/shared lookup path

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 1e6dc88)
jdbaldry added a commit that referenced this pull request Aug 31, 2023
#4921) (#5041)

* Use updated version inference in all Agent docs

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix doc/shared lookup path

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 1e6dc88)

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
@github-actions github-actions bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Feb 22, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport release-v0.36 frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants