Repository navigation
Lint Markdown pages on pull requests - #312
Conversation
Runs markdownlint-cli2 on content pages for each PR. Rules the existing pages break are off for now so the check starts green and catches new breakage such as broken reference links and bad tables.
|
Rules turned off in Off because they clash with how the site is written: MD013 (line length), MD033 (inline HTML) and MD041 (first line heading, as the title comes from the Off because existing pages break them (225 of 287 pages). Each rule shows the pages that fail it and the number of issues per page.
|
jbampton
left a comment
There was a problem hiding this comment.
I would prefer to use the ASF approved prek-action:
https://github.com/apache/infrastructure-actions/blob/main/approved_patterns.yml#L234
And then we can add all the linters and scripts in the pre-commit config in one place
https://github.com/j178/prek-action
Benefits are that we can run this on our local machines with prek as well as running on the GitHub CI
Moves markdownlint-cli2 into .pre-commit-config.yaml and runs it with the ASF approved prek-action, so the same checks run locally with prek and in CI.
|
Good idea, switched to prek. |
Adds a markdownlint-cli2 check on pull requests that touch content pages. Pelican metadata and the theme are skipped. Rules the current pages break are off, so the check passes on all 287 pages today and catches new problems such as undefined reference links, empty links and table column mismatches. Each disabled rule can be turned back on as pages are cleaned up.