mirror of
https://github.com/gaurav-nelson/github-action-markdown-link-check.git
synced 2024-10-26 20:35:22 +03:00
Check all links in markdown files if they are alive or dead. 🔗✔️
actionhacktoberfestlink-checkerlink-checkingmarkdownmarkdown-link-checkscheduled-runsstarred-gaurav-nelson-repostarred-repo
6aac1af405
0.6.0 |
||
---|---|---|
.github/workflows | ||
action.yml | ||
Dockerfile | ||
entrypoint.sh | ||
LICENSE | ||
mlc_config.json | ||
README2.md | ||
README.md |
GitHub Action - Markdown link check 🔗✔️
This GitHub action checks all Markdown files in your repository for broken links. (Uses tcort/markdown-link-check)
How to use
-
Create a new file in your repository
.github/workflows/action.yml
. -
Copy-paste the following workflow in your
action.yml
file:name: Check Markdown links on: push jobs: markdown-link-check: runs-on: ubuntu-latest steps: - uses: actions/checkout@master with: fetch-depth: 1 - uses: gaurav-nelson/github-action-markdown-link-check@0.5.0
-
Or you can use the action with variables as follows:
name: Check Markdown links on: push jobs: markdown-link-check: runs-on: ubuntu-latest steps: - uses: actions/checkout@master with: fetch-depth: 1 - uses: gaurav-nelson/github-action-markdown-link-check@0.5.0 with: use-quiet-mode: 'yes' use-verbose-mode: 'yes' config-file: 'mlc_config.json' folder-path: 'docs/markdown_files'
Available variables
use-quiet-mode
: Specifyyes
to only show errors in output.use-verbose-mode
: Specifyyes
to show detailed HTTP status for checked links.config-file
: Specify a custom configuration file for markdown-link-check. You can use it to remove false-positives by specifying replacement patterns and ignore patterns.folder-path
: By default thegithub-action-markdown-link-check
action checks for all markdown files in your repository. Use this option to limit checks to only specific folders.
Test internal and external links
www.google.com
This is another broken link but its ignored using a configuration file.
Alpha
This exists. This one does not. References and definitions are checked too.
Bravo
Headings in readme.md
are not checked.
But missing files are reported.
External file: Charlie