Skip to content

Conversation

@torimwhaley
Copy link
Contributor

Summary

Adds automated validation scripts that run on PRs to help maintain documentation quality. These checks are informational only and will not block merging.

Changes

New Scripts

  • scripts/check-image-locations.js - Validates that images follow the repository structure (e.g., guides/dashboard.mdximages/guides/dashboard/)
  • .github/workflows/validate-docs.yml - GitHub Actions workflow that runs validation on every PR

Updated Scripts

  • scripts/check-links.js - Now also validates redirect destinations in docs.json to catch broken redirects when pages are moved

What This Does

When a PR is opened, the workflow automatically:

  1. ✅ Checks for broken internal links
  2. ✅ Validates image locations match page structure
  3. ✅ Verifies redirect destinations exist
  4. ✅ Identifies orphaned pages not in docs.json

Important: These checks show as ⚠️ warnings and provide helpful feedback, but will NOT block PR merging.

Notes

  • Pre-existing issues (49 misplaced images, 6 broken links) are from the recent repo reorganization and can be fixed separately (in seperate PR)
  • This automation prevents new issues from being introduced going forward

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

📋 Documentation Validation Report

⚠️ Some issues were found in this PR. These are informational warnings and will not block merging.

🔗 Links

❌ Found broken links (click to expand)
📄 Found 154 documentation files
📄 guides/embedding/dashboards.mdx:447
   🔗 Broken link: /references/user-attributes
📄 guides/table-calculations.mdx:6
   🔗 Broken link: references/dimensions
📄 guides/table-calculations.mdx:6
   🔗 Broken link: references/metrics
📄 guides/table-calculations.mdx:27
   🔗 Broken link: references/metrics
📄 references/iframe-embedding.mdx:337

🖼️ Images

❌ Found image location issues (click to expand)
📄 Found 153 documentation files
   📄 get-started/develop-in-lightdash/adding-tables-to-lightdash.mdx:162
      ❌ Expected in: images/get-started/develop-in-lightdash/adding-tables-to-lightdash/
   📄 get-started/exploring-data/exploring-your-content.mdx:127
      ❌ Expected in: images/get-started/exploring-data/exploring-your-content/
   📄 get-started/exploring-data/using-explores.mdx:110
      ❌ Expected in: images/get-started/exploring-data/using-explores/
   📄 guides/cli/how-to-use-lightdash-validate.mdx:37
      ❌ Expected in: images/guides/cli/how-to-use-lightdash-validate/
   📄 guides/developer/cli/how-to-compile-your-lightdash-project.mdx:20

💡 Quick Reference:

  • A page at guides/dashboard.mdx should use images from images/guides/dashboard/
  • Shared images can be placed in parent directories
  • All internal links must point to existing files

📖 Run node scripts/check-links.js and node scripts/check-image-locations.js locally for full details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants