@tiramisu-docs/kit 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/seo.js CHANGED
@@ -90,7 +90,8 @@ export function buildInstantOgUrl(pageUrl, options) {
90
90
  return `https://instantog.com/api/og?${params.toString()}`;
91
91
  }
92
92
  export function buildCanonicalUrl(baseUrl, slug) {
93
- return `${baseUrl.replace(/\/+$/, "")}/docs/${slug}`;
93
+ const cleanSlug = slug.replace(/\/index$/, "");
94
+ return `${baseUrl.replace(/\/+$/, "")}/docs/${cleanSlug}`;
94
95
  }
95
96
  export function buildPageJsonLd(options) {
96
97
  const url = buildCanonicalUrl(options.baseUrl, options.slug);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiramisu-docs/kit",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "svelte": "src/index.ts",
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "dependencies": {
49
49
  "@timeleap/tiramisu": "^1.9.0",
50
- "@tiramisu-docs/core": "0.1.0",
50
+ "@tiramisu-docs/core": "0.1.1",
51
51
  "clsx": "^2.1.1",
52
52
  "iconify-icon": "^2.3.0",
53
53
  "minisearch": "^7.2.0",
package/src/seo.ts CHANGED
@@ -109,7 +109,8 @@ export function buildInstantOgUrl(pageUrl: string, options: { siteId: string; te
109
109
  }
110
110
 
111
111
  export function buildCanonicalUrl(baseUrl: string, slug: string): string {
112
- return `${baseUrl.replace(/\/+$/, "")}/docs/${slug}`
112
+ const cleanSlug = slug.replace(/\/index$/, "")
113
+ return `${baseUrl.replace(/\/+$/, "")}/docs/${cleanSlug}`
113
114
  }
114
115
 
115
116
  export function buildPageJsonLd(options: {