Skip to content

Chore: fix docs anchors #1778

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

Merged
merged 4 commits into from
May 9, 2025
Merged

Chore: fix docs anchors #1778

merged 4 commits into from
May 9, 2025

Conversation

tolzhabayev
Copy link
Collaborator

@tolzhabayev tolzhabayev commented May 8, 2025

What this PR does / why we need it:

Fixing broken anchors, mostly related to anchors changing due to #1770

Making onBrokenAnchors throw an error now to catch those broken anchors earlier.

Special notes for your reviewer:

  • Had to change a bit the way sed works as it was not working on my mac - it was creating metadata.md" file (yes with quotes at the end). Moved it towards a sed command that works on both mac and gnu

Testing

@tolzhabayev tolzhabayev requested review from a team as code owners May 8, 2025 16:12
@tolzhabayev tolzhabayev self-assigned this May 8, 2025
@tolzhabayev tolzhabayev added documentation Changes only affect the documentation no-changelog Don't include in changelog and version calculations labels May 8, 2025
@tolzhabayev tolzhabayev moved this from 📬 Triage to 🔬 In review in Plugins Platform / Grafana Community May 8, 2025
Copy link
Contributor

github-actions bot commented May 8, 2025

Hello! 👋 This repository uses Auto for releasing packages using PR labels.

✨ This PR can be merged. It will not be considered when calculating future versions of the npm packages and will not appear in the changelogs.

@@ -30,6 +30,8 @@ yarn-error.log*
# Generated files
.docusaurus
.cache-loader
docusaurus/website/scripts/plugin.schema.json
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added some files to .gitignore to avoid committing them accidentally


# Add docusaurus header to the top of the file
sed $SED_OPTS "1i\\
sed -i.bak "1i\\
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Had to change a bit the way sed works as it was not working on my mac - it was creating metadata.md" file (yes with quotes at the end). Moved it towards a sed command that works on both mac and gnu

https://stackoverflow.com/a/4247333

@tolzhabayev tolzhabayev requested review from jackw and removed request for wbrowne and xnyo May 8, 2025 16:18
@@ -31,6 +31,7 @@ const config: Config = {
baseUrl: 'developers/plugin-tools/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
onBrokenAnchors: 'throw',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fails now when broken anchors are detected, instead of only warning

Copy link
Collaborator

@jackw jackw left a comment

Choose a reason for hiding this comment

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

Lovely stuff. 🚀

I also had the same issue on my Mac with the file name with quote mark.

Copy link
Contributor

@hugohaggmark hugohaggmark left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

Run it locally on my mac and it works as expected 👍

@tolzhabayev tolzhabayev merged commit d83cc4a into main May 9, 2025
21 checks passed
@github-project-automation github-project-automation bot moved this from 🔬 In review to 🚀 Shipped in Plugins Platform / Grafana Community May 9, 2025
@tolzhabayev tolzhabayev deleted the chore/fix-anchors branch May 9, 2025 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Changes only affect the documentation no-changelog Don't include in changelog and version calculations
Projects
Development

Successfully merging this pull request may close these issues.

5 participants