Skip to content

Commit d83cc4a

Browse files
authored
Chore: fix docs anchors (#1778)
1 parent c37eb4f commit d83cc4a

File tree

9 files changed

+452
-269
lines changed

9 files changed

+452
-269
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ yarn-error.log*
3030
# Generated files
3131
.docusaurus
3232
.cache-loader
33+
docusaurus/website/scripts/plugin.schema.json
34+
*.bak
3335

3436
# Allow vscode config inside templates
3537
!packages/create-plugin/templates/*/.vscode

docusaurus/docs/e2e-test-a-plugin/get-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Open a new terminal and run the test script from within your local plugin develo
5050

5151
### Step 3: Run tests in CI
5252

53-
The [`grafanaDependency`](../reference/metadata.md#properties-1) property in the `plugin.json` file specifies what versions of Grafana the plugin is compatible with. As a best practice, run your Playwright end-to-end tests targeting all the supported versions. The GitHub workflow that can be included when scaffolding plugins with `create-plugin` ensures this is the case.
53+
The [`grafanaDependency`](../reference/metadata.md#dependencies) property in the `plugin.json` file specifies what versions of Grafana the plugin is compatible with. As a best practice, run your Playwright end-to-end tests targeting all the supported versions. The GitHub workflow that can be included when scaffolding plugins with `create-plugin` ensures this is the case.
5454

5555
If you chose to not add a GitHub workflow when you scaffolded the plugin, as a best practice follow the instructions in the [CI](./ci.md) guide to run Playwright end-to-end tests targeting all versions of Grafana that your plugin supports.
5656

docusaurus/docs/migration-guides/update-from-grafana-versions/v7.x-v8.x.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ import { cx, css } from '@emotion/css';
199199

200200
## Update needed for app plugins using dashboards
201201

202-
To make side navigation work properly - app plugins targeting Grafana `8.+` and integrating into the side menu via [addToNav](/reference/metadata.md#properties-6) property need to adjust their `plugin.json` and all dashboard json files to have a matching `uid`.
202+
To make side navigation work properly - app plugins targeting Grafana `8.+` and integrating into the side menu via [addToNav](/reference/metadata.md#includes) property need to adjust their `plugin.json` and all dashboard json files to have a matching `uid`.
203203

204204
**`plugin.json`**
205205

docusaurus/docs/publish-a-plugin/build-automation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ to ensure that your plugin will be built and packaged in the correct format.
2020

2121
Additionally, we recommend using the zip file produced from this workflow to test the plugin.
2222

23-
If a Grafana Access Policy Token is included in your [Github repository secrets](https://docs.github.com/en/codespaces/managing-codespaces-for-your-organization/managing-development-environment-secrets-for-your-repository-or-organization), a signed build is automatically created, which you can use to test the plugin locally before submission. The [sign a plugin](./sign-a-plugin.md#generate-an-access-policy-token/) documentation includes guidance on how to create this token.
23+
If a Grafana Access Policy Token is included in your [Github repository secrets](https://docs.github.com/en/codespaces/managing-codespaces-for-your-organization/managing-development-environment-secrets-for-your-repository-or-organization), a signed build is automatically created, which you can use to test the plugin locally before submission. The [sign a plugin](./sign-a-plugin.md#generate-an-access-policy-token) documentation includes guidance on how to create this token.
2424

2525
By creating a release tag, the whole process becomes automated, resulting in a zip file that you can submit for publication to the [Grafana plugin catalog](https://grafana.com/plugins)
2626

docusaurus/docs/publish-a-plugin/publishing-best-practices.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Metadata plays a crucial role in making your Grafana plugin discoverable and use
2525

2626
Here’s a breakdown of the key components to focus on:
2727

28-
**[Plugin name](../reference/plugin-json#properties)**
28+
**[Plugin name](../reference/plugin-json)**
2929

3030
`name`
3131

@@ -67,7 +67,7 @@ Ensure your screenshots are a suitable resolution and file type (e.g. png, jpeg,
6767

6868
:::
6969

70-
**[Sponsorship link](../reference/plugin-json#links)**
70+
**[Sponsorship link](../reference/plugin-json#infolinks)**
7171

7272
`info.links`
7373

docusaurus/docs/reference/metadata.md

Lines changed: 440 additions & 257 deletions
Large diffs are not rendered by default.

docusaurus/docs/tutorials/build-an-app-plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ You don't need to register all your pages inside `includes` in your `plugin.json
121121

122122
:::tip
123123

124-
You can limit which users have access to pages in the navigation menu by using the [`role`](/reference/plugin-json#properties-7) property.
124+
You can limit which users have access to pages in the navigation menu by using the [`role`](/reference/plugin-json#includes) property.
125125

126126
:::
127127

docusaurus/website/docusaurus.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const config: Config = {
3131
baseUrl: 'developers/plugin-tools/',
3232
onBrokenLinks: 'throw',
3333
onBrokenMarkdownLinks: 'warn',
34+
onBrokenAnchors: 'throw',
3435
favicon: 'img/favicon.png',
3536
// GitHub pages deployment config.
3637
// If you aren't using GitHub pages, you don't need these.

docusaurus/website/scripts/generate-markdown.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,10 @@ fi
1919
npx --yes jsonschema2mk --partials "$PARTIALS" --schema "$INPUT_FILE" > "$OUTPUT_FILE"
2020

2121
# Detect OS and set sed options accordingly
22-
if [[ "$OSTYPE" == "darwin"* ]]; then
23-
SED_OPTS="-i ''"
24-
else
25-
SED_OPTS="-i"
26-
fi
22+
2723

2824
# Add docusaurus header to the top of the file
29-
sed $SED_OPTS "1i\\
25+
sed -i.bak "1i\\
3026
---\\
3127
id: plugin-json\\
3228
title: Metadata (plugin.json)\\
@@ -45,5 +41,6 @@ sidebar_position: 10\\
4541
" "$OUTPUT_FILE"
4642

4743
rm -f "$INPUT_FILE"
44+
rm -f "$OUTPUT_FILE.bak"
4845

4946
echo "Markdown generation complete!"

0 commit comments

Comments
 (0)