This commit is contained in:
Roel Fauconnier 2021-11-10 16:26:33 +01:00
Родитель f93810198b
Коммит 56c4f85236
3 изменённых файлов: 67 добавлений и 0 удалений

34
.github/workflows/md-linter.yaml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,34 @@
name: Lint and Check Markdown
on:
pull_request:
branches: [docs/main]
# only trigger when the PR contains a markdown file
paths:
- '**.md'
- '**.markdown'
push:
branches:
- dev
jobs:
lint-markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: |
npm install markdownlint-cli
- run: |
node_modules/.bin/markdownlint -c .markdownlint.jsonc -i node_modules/ .
check-markdown-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Markdown Link Check
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
check-modified-files-only: 'no' #todo make this dependent on label
config-file: .markdown-link-check.jsonc
use-quiet-mode: 'yes'

Просмотреть файл

@ -0,0 +1,27 @@
{
"ignorePatterns": [
{
"pattern": "^http://modulename"
},
{
"pattern": "^https://xxx"
},
{
"pattern": "^http://localhost"
},
{
"pattern": "^http://yourhost"
}
],
"replacementPatterns": [
{
"pattern": "^/",
"replacement": "{{BASEURL}}/"
},
{
"pattern": "^./",
"replacement": "{{BASEURL}}/"
}
],
"aliveStatusCodes": [200, 206]
}

6
.markdownlint.jsonc Normal file
Просмотреть файл

@ -0,0 +1,6 @@
{
// disable line length limitations for existing documentation
"MD013": false,
// allow same headings
"MD024": false
}