diff --git a/.github/workflows/mkdocs.yaml b/.github/workflows/mkdocs.yaml index 34e4fd029..d9883ea56 100644 --- a/.github/workflows/mkdocs.yaml +++ b/.github/workflows/mkdocs.yaml @@ -25,9 +25,16 @@ jobs: steps: - uses: actions/checkout@v4 + - name: markdownlint + uses: nosborn/github-action-markdown-cli@v3.3.0 + with: + files: docs + config_file: .markdownlint.yml - uses: actions/setup-python@v5 with: python-version: 3.x + cache: pip + cache-dependency-path: requirements-docs.txt - run: pip install -r requirements-docs.txt - run: mkdocs build - uses: actions/upload-pages-artifact@v2 diff --git a/.markdownlint.yml b/.markdownlint.yml new file mode 100644 index 000000000..eed10e5fc --- /dev/null +++ b/.markdownlint.yml @@ -0,0 +1,37 @@ +--- +# Enable default rules +default: true + +# MD007 - Unordered list indentation +# Sets nested list indents to 4 spaces instead of the default of 2. +# Required by Python-Markdown used by mkdocs +MD007: + indent: 4 + +# MD010 - No hard tabs +# No hard tabs allowed in docs. Use 4 spaces instead. +# This is disabled inline when used. +MD010: true + +# MD013 - Line length +# Defaults to 80 characters. +MD013: false + +# MD014 - Dollar signs used before commands without showing output +# Ignores terminal examples using dollar signs without any output examples after. +# These occur in multiple places throughout our docs. +MD014: false + +# MD024 - Multiple headings with the same content +# Multiple identical headings in the document are not allowed +# This is disabled on all of the release notes pages in docs/release-notes +MD024: true + +# MD033 - Inline HTML +# Triggered when raw HTML is used in a markdown document +# Disabled inline when used. +MD033: true + +# MD041 - First line in a file should be a top-level heading +# This requires a top-level heading as the first line in every doc. +MD041: true