starlight-cannoli-plugins 1.0.3 → 1.0.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.
@@ -24,7 +24,8 @@ function normalizePath(path, fromFilePath, siteRootPath) {
24
24
  const fileDir = dirname(fromFilePath);
25
25
  const resolvedPath = resolve(fileDir, path);
26
26
  const siteRoot = resolve(siteRootPath);
27
- return "/" + resolve(resolvedPath).slice(siteRoot.length).replace(/\\/g, "/");
27
+ const relativePath = resolve(resolvedPath).slice(siteRoot.length).replace(/\\/g, "/").replace(/^\/+/, "");
28
+ return "/" + relativePath;
28
29
  }
29
30
 
30
31
  // src/plugins/rehype-validate-links.ts
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  normalizePath,
6
6
  rehypeValidateLinks
7
- } from "./chunk-H377D3RC.js";
7
+ } from "./chunk-DMZXDINW.js";
8
8
 
9
9
  // src/plugins/astro-normalize-paths.ts
10
10
  import { readFileSync, writeFileSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  rehypeValidateLinks,
3
3
  rehype_validate_links_default
4
- } from "../chunk-H377D3RC.js";
4
+ } from "../chunk-DMZXDINW.js";
5
5
  export {
6
6
  rehype_validate_links_default as default,
7
7
  rehypeValidateLinks
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "starlight-cannoli-plugins",
3
3
  "type": "module",
4
- "version": "1.0.3",
4
+ "version": "1.0.4",
5
5
  "description": "Starlight plugins for automatic sidebar generation and link validation",
6
6
  "license": "ISC",
7
7
  "main": "./dist/index.js",