-
Couldn't load subscription status.
- Fork 377
Add CI for docs quality (markdownlint + lychee) and contributor instructions #2006
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
...uctions Add GitHub Actions workflow to enforce docs quality on PRs: .github/workflows/docs-quality.yml: runs markdownlint-cli2 and lychee against **/*.md Add repository-wide configs: .markdownlint.jsonc: formatting rules (line length, heading rules, list indents, allow inline HTML) .lychee.toml: link checker tuning (retries, excluded transient links, concurrency) Update contributor guidance: CONTRIBUTING.md: added "Docs quality checks" section with local commands for markdownlint and lychee Improve docs content clarity: docs/inference-providers/index.md: fixed typos and naming consistency (e.g., "JavaScript", removed duplicate "the", clarified token wording and fetch usage) Enhance project onboarding: README.md: added Inference Providers generator instructions and link to CONTRIBUTING.md Added CONTRIBUTING.md: Hacktoberfest-friendly steps, local preview with hf-doc-builder, and generator usage 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: cargo install lychee Run: lychee --config .lychee.toml **/*.md
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Uh oh!
There was an error while loading. Please reload this page.
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