Skip to content

Commit

Permalink
Add starlight links validator (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
huijing authored May 29, 2024
1 parent 9dab3c5 commit c0822c5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import remarkMath from "remark-math";
import rehypeMathjax from "rehype-mathjax";
import starlightLinksValidator from "starlight-links-validator";

// https://astro.build/config
export default defineConfig({
Expand All @@ -19,6 +20,7 @@ export default defineConfig({
"./node_modules/@interledger/docs-design-system/src/styles/teal-theme.css",
"./node_modules/@interledger/docs-design-system/src/styles/ilf-docs.css",
],
plugins: [starlightLinksValidator()],
expressiveCode: {
styleOverrides: {
borderColor: "transparent",
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/starlight": "^0.22.3",
"@astrojs/starlight": "^0.23.2",
"@interledger/docs-design-system": "^0.5.0",
"astro": "^4.8.3",
"astro": "^4.9.2",
"rehype-mathjax": "^6.0.0",
"remark-math": "^6.0.0",
"sharp": "^0.33.3"
"sharp": "^0.33.4",
"starlight-links-validator": "^0.9.0"
}
}
7 changes: 4 additions & 3 deletions src/content/docs/content/markdown.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ Text can be **bold**, _italic_, or ~~strikethrough~~.
Text can be **bold**, _italic_, or ~~strikethrough~~.
```

You can [link to another page](/getting-started/).
You can [link to another page](/).

```md
You can [link to another page](/getting-started/).
You can [link to another page](/).
```

You can highlight `inline code` with backticks.
Expand Down Expand Up @@ -120,6 +120,7 @@ npm create astro@latest -- --template starlight
### Custom titles

You can specify a custom title for the aside in square brackets following the aside type. For example:

```
:::tip[Did you know?]
```
Expand Down Expand Up @@ -213,7 +214,7 @@ I mean, at least it works by default now, right?
````js
```js title="Starlight default title style"
I mean, at least it works by default now, right?
```
```;
````
Code blocks will be rendered as a terminal window if their language identifier is `bash`, `shellscript`, `shell`, `sh`, or `zsh`. Titles are styled differently in this context.
Expand Down

0 comments on commit c0822c5

Please sign in to comment.