File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 11import { defineConfig } from "vitepress" ;
22
3- // https://vitepress.dev/reference/site-config
43export 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+ / \. m d $ / ,
56+ "" ,
57+ ) ;
58+
59+ pageData . frontmatter . head ??= [ ] ;
60+ pageData . frontmatter . head . push ( [
61+ "link" ,
62+ { rel : "canonical" , href : canonicalUrl } ,
63+ ] ) ;
64+ } ,
5165} ) ;
Original file line number Diff line number Diff line change 1+ User-agent: *
2+ Allow: /
3+
4+ Sitemap: https://bunster.netlify.app/sitemap.xml
You can’t perform that action at this time.
0 commit comments