Skip to content

Commit b2a95a4

Browse files
committed
docs: added rel=canonical tags
1 parent 19869b6 commit b2a95a4

File tree

15 files changed

+35
-80
lines changed

15 files changed

+35
-80
lines changed

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ registry/
44
docs/cli
55
docs/environments.md
66
docs/registry.md
7-
docs/.vitepress/cache
87
docs/.vitepress/dist
98
docs/public/site.webmanifest
109
schema/mise.json.hbs

docs/.vitepress/config.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineConfig } from "vitepress";
1+
import { defineConfig, type TransfomContext } from "vitepress";
22
import { Command, commands } from "./cli_commands";
33

44
// https://vitepress.dev/reference/site-config
@@ -156,6 +156,17 @@ export default defineConfig({
156156
gtag('config', 'G-B69G389C8T');`,
157157
],
158158
],
159+
transformPageData(pageData) {
160+
const canonicalUrl = `https://mise.jdx.dev/${pageData.relativePath}`
161+
.replace(/index\.md$/, "")
162+
.replace(/\.md$/, ".html");
163+
164+
pageData.frontmatter.head ??= [];
165+
pageData.frontmatter.head.push([
166+
"link",
167+
{ rel: "canonical", href: canonicalUrl },
168+
]);
169+
},
159170
});
160171

161172
function cliReference(commands: { [key: string]: Command }) {

docs/config.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/dev-tools/comparison-to-asdf.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
---
2-
head:
3-
- - link
4-
- rel: canonical
5-
href: https://mise.jdx.dev/dev-tools/comparison-to-asdf
6-
---
7-
81
# Comparison to asdf
92

103
mise can be used as a drop-in replacement for asdf. It supports the same `.tool-versions` files that

docs/lang/bun.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
---
2-
head:
3-
- - link
4-
- rel: canonical
5-
href: https://mise.jdx.dev/lang/bun
6-
---
7-
81
# Bun
92

103
The following are instructions for using the bun mise core plugin. This is used when there isn't a

docs/lang/deno.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
---
2-
head:
3-
- - link
4-
- rel: canonical
5-
href: https://mise.jdx.dev/lang/deno
6-
---
7-
81
# Deno
92

103
The following are instructions for using the deno mise core plugin. This is used when there isn't a

docs/lang/erlang.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
---
2-
head:
3-
- - link
4-
- rel: canonical
5-
href: https://mise.jdx.dev/lang/erlang
6-
---
7-
81
# Erlang
92

103
The following are instructions for using the erlang core plugin.

docs/lang/go.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
---
2-
head:
3-
- - link
4-
- rel: canonical
5-
href: https://mise.jdx.dev/lang/go
6-
---
7-
81
# Go
92

103
The following are instructions for using the go mise core plugin. This is used when there isn't a

docs/lang/java.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
---
2-
head:
3-
- - link
4-
- rel: canonical
5-
href: https://mise.jdx.dev/lang/java
6-
---
7-
81
# Java
92

103
The following are instructions for using the java mise core plugin. This is used when there isn't a

docs/lang/node.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
---
2-
head:
3-
- - link
4-
- rel: canonical
5-
href: https://mise.jdx.dev/lang/node
6-
---
7-
81
# Node
92

103
The following are instructions for using the node mise core plugin. This is used when there isn't a

0 commit comments

Comments
 (0)