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

Replace < with % in var references in headings #5975

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

clayton-cornell
Copy link
Contributor

@clayton-cornell clayton-cornell commented Dec 13, 2023

PR Description

The table of contents is generated during Markdown processing and shortcodes with {{< VAR_NAME >}} syntax haven't been rendered at that point.

Recent changes to use a cascading variable for the Grafana Agent Flow product name use the {{< VAR_NAME >}} shortcode in many of the headings. The result is the heading anchor link URLs contain hahahugoshortcodes0hbhb in place of Grafana Agent Flow

To fix this we have to use {{% VAR_NAME %}} shortcode syntax in the headings only. This tells Hugo to render the shortcode before the markdown... and... anchor link URLs look normal.

Which issue(s) this PR fixes

Notes to the Reviewer

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated
  • Config converters updated

@clayton-cornell clayton-cornell added type/docs Docs Squad label across all Grafana Labs repos backport release-v0.38 labels Dec 13, 2023
@clayton-cornell clayton-cornell requested a review from a team December 13, 2023 23:52
Copy link
Member

@jdbaldry jdbaldry left a comment

Choose a reason for hiding this comment

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

❤️

@clayton-cornell clayton-cornell merged commit 7e0bf25 into main Dec 14, 2023
10 checks passed
@clayton-cornell clayton-cornell deleted the docs/fix-bad-variable-handling branch December 14, 2023 13:29
@grafanabot
Copy link
Contributor

The backport to release-v0.38 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-5975-to-release-v0.38 origin/release-v0.38
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 7e0bf25ed090a92d235b506aa021605be7f25e0f
# Push it to GitHub
git push --set-upstream origin backport-5975-to-release-v0.38
git switch main
# Remove the local backport branch
git branch -D backport-5975-to-release-v0.38

Then, create a pull request where the base branch is release-v0.38 and the compare/head branch is backport-5975-to-release-v0.38.

clayton-cornell added a commit that referenced this pull request Dec 14, 2023
clayton-cornell added a commit that referenced this pull request Dec 14, 2023
clayton-cornell added a commit that referenced this pull request Dec 15, 2023
BarunKGP pushed a commit to BarunKGP/grafana-agent that referenced this pull request Feb 20, 2024
@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 21, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport release-v0.38 frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. type/docs Docs Squad label across all Grafana Labs repos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants