Skip to content

Conversation

Tejassveer08
Copy link

@Tejassveer08 Tejassveer08 commented Oct 21, 2025

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

…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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add repo-wide docs quality gates: Markdown linting and external link checks

1 participant