Skip to content

Commit 81d82b5

Browse files
Merge pull request #70 from yassinebenaid/improve-docs
Improve docs
2 parents d7bb370 + 0a607ea commit 81d82b5

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

docs/.vitepress/config.mts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import { defineConfig } from "vitepress";
22

3-
// https://vitepress.dev/reference/site-config
43
export default defineConfig({
54
title: "Bunster",
65
description:
76
"Compile shell scripts to native self-contained executable programs",
87
themeConfig: {
9-
// https://vitepress.dev/reference/default-theme-config
108
nav: [
119
{ text: "Documentation", link: "/quick-start" },
1210
{ text: "Installation", link: "/installation" },
@@ -48,4 +46,20 @@ export default defineConfig({
4846
sitemap: {
4947
hostname: "https://bunster.netlify.app",
5048
},
49+
cleanUrls: true,
50+
51+
// we set the canonical url
52+
transformPageData(pageData) {
53+
const canonicalUrl =
54+
`https://bunster.netlify.app/${pageData.relativePath}`.replace(
55+
/\.md$/,
56+
"",
57+
);
58+
59+
pageData.frontmatter.head ??= [];
60+
pageData.frontmatter.head.push([
61+
"link",
62+
{ rel: "canonical", href: canonicalUrl },
63+
]);
64+
},
5165
});

docs/public/robots.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
User-agent: *
2+
Allow: /
3+
4+
Sitemap: https://bunster.netlify.app/sitemap.xml

0 commit comments

Comments
 (0)