Skip to content

Commit

Permalink
Here?
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshew committed Aug 7, 2024
1 parent 7f70a7a commit 5ab9983
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/actions/validate-docs-links/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,17 @@ function normalizePath(filePath: string): string {
// Remap repository file path to the vercel-site url path without `/docs/`
// e.g. `docs/01-api/getting-started/index.mdx` -> `api/getting-started`
filePath
// We remove `docs/` to normalize paths between regular links
// e.g. `/docs/api/example` and related/source links e.g `api/example`
// TODO:
// - Fix `vercel-site` to handle full paths for related/source links
// - Update doc files to use full paths for related/source links
// - Remove this workaround
.replace(DOCS_PATH.substring(1), "")
// Remove prefix numbers used for ordering
.replace(/(\d\d-)/g, "")
.replace(".mdx", "")
.replace("/index", "")
// We remove `docs/` to normalize paths between regular links
// e.g. `/docs/api/example` and related/source links e.g `api/example`
// TODO:
// - Fix `vercel-site` to handle full paths for related/source links
// - Update doc files to use full paths for related/source links
// - Remove this workaround
// .replace(DOCS_PATH.substring(1), "")
// // Remove prefix numbers used for ordering
// .replace(/(\d\d-)/g, "")
// .replace(".mdx", "")
// .replace("/index", "")
);
}

Expand Down

0 comments on commit 5ab9983

Please sign in to comment.