Add CI for docs quality (markdownlint + lychee) and contributor instructions #2006
+170
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #2005
This PR introduces automated documentation quality enforcement for all pull requests.
It adds GitHub Actions workflows, linting configurations, and updated contributor documentation to ensure consistent, readable, and link-safe docs across the repository.
🚀 Changes Introduced
🧩 GitHub Actions Workflow
File: .github/workflows/docs-quality.yml
Runs markdownlint-cli2
and lychee
against all Markdown files (**/*.md).
Automatically checks:
Markdown formatting consistency
Broken or unreachable links
⚙️ Repository-Wide Configurations
.markdownlint.jsonc – defines formatting rules:
Enforces line length limits
Heading and list indentation rules
Allows inline HTML where needed
.lychee.toml – link checker settings:
Retry behavior
Excluded transient/unstable links
Optimized concurrency for faster checks
🧑💻 Contributor Guidance
File Updated: CONTRIBUTING.md
Added a new section: “Docs Quality Checks”
Includes local commands for:
markdownlint-cli2 validation
lychee link checking
Mentions how to fix or ignore warnings responsibly
📚 Documentation Improvements
File: docs/inference-providers/index.md
Fixed typos and improved naming consistency (e.g., “JavaScript”)
Removed redundant words (like duplicate “the”)
Clarified token explanations and fetch usage examples
🧭 Enhanced Onboarding
File: README.md
Added Inference Providers Generator usage guide
Linked directly to the updated CONTRIBUTING.md
Added: CONTRIBUTING.md
Hacktoberfest-friendly contribution steps
Local preview setup with hf-doc-builder
Guidance on using the Inference Providers generator
💡 Why This Change
Prevents broken links and inconsistent formatting from entering main
Gives contributors clear, reproducible local checks
Improves long-term docs quality and review efficiency
🧪 How to Run Locally
🔍 Markdown Lint
npx markdownlint-cli2 "/*.md"
--config .markdownlint.jsonc
--ignore "/node_modules/"
--ignore "/.git/**"
🔗 Link Check
Install lychee if not already
cargo install lychee
Run link checker
lychee --config .lychee.toml **/*.md
✅ Outcome
Automated docs validation on every PR
Streamlined contributor workflow
Higher-quality, readable, and consistent documentation