radiant-docs-validator 0.1.7 → 0.1.9

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2527,13 +2527,14 @@ async function validateConfig(config) {
2527
2527
  config.home = validateHome(config.home);
2528
2528
  if (config.home === void 0) {
2529
2529
  const fallbackHome = getFirstPagePathFromNavigation(config.navigation);
2530
- if (!fallbackHome) {
2530
+ if (fallbackHome) {
2531
+ config.home = fallbackHome;
2532
+ } else if (!config.navigation.openapi) {
2531
2533
  throwConfigError(
2532
2534
  "Home is undefined and no documentation page exists in navigation to use as fallback.",
2533
2535
  ["home"]
2534
2536
  );
2535
2537
  }
2536
- config.home = fallbackHome;
2537
2538
  }
2538
2539
  const hiddenPageRoutes = [
2539
2540
  ...validateNavbar(config.navbar),
@@ -2938,6 +2939,10 @@ async function validateMdxContent() {
2938
2939
  const linkIndex = buildDocsLinkIndex(config, files);
2939
2940
  for (const file of files) {
2940
2941
  const relativePath = path.relative(DOCS_DIR, file);
2942
+ const normalizedFilePath = normalizeDocsFilePath(relativePath);
2943
+ if (!linkIndex.routableDocsFilePaths.has(normalizedFilePath)) {
2944
+ continue;
2945
+ }
2941
2946
  try {
2942
2947
  const content = fs.readFileSync(file, "utf-8");
2943
2948
  const match = content.match(/^---\n([\s\S]*?)\n---/);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "radiant-docs-validator",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Shared validation for Radiant documentation repositories",
5
5
  "type": "module",
6
6
  "scripts": {