Skip to content

Commit

Permalink
trial for link checker
Browse files Browse the repository at this point in the history
  • Loading branch information
gulcingulletutan committed Apr 30, 2024
1 parent b1da7a1 commit ae8ea33
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/mlc_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"ignorePatterns": [
{
"pattern": "^http://ignored-domain.com"
}
],
"httpHeaders": [
{
"urls": ["https://github.com/", "https://guides.github.com/", "https://help.github.com/", "https://docs.github.com/"],
"headers": {
"Accept-Encoding": "zstd, br, gzip, deflate"
}
}
]
}
18 changes: 18 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Check Markdown links

on:
push: [master]

jobs:
markdown-link-check:
runs-on: ubuntu-latest
# check out the latest version of the code
steps:
- uses: actions/checkout@v3
# checks the status of hyperlinks in .md files in verbose mode
name: Check links
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: 'mlc_config.json'
2 changes: 1 addition & 1 deletion bin/lesson_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ def __init__(self, args, filename, metadata, metadata_len, text, lines, doc):
(re.compile(r'README\.md'), CheckNonJekyll),
(re.compile(r'index\.md'), CheckIndex),
(re.compile(r'reference\.md'), CheckReference),
(re.compile(os.path.join('_episodes', '*\.md')), CheckEpisode),
(re.compile(os.path.join('_episodes', r'.*\.md')), CheckEpisode),
(re.compile(r'.*\.md'), CheckGeneric)
]

Expand Down

0 comments on commit ae8ea33

Please sign in to comment.