Skip to content

MarkdownLint mdl Action

Actions
Run mdl on your markdown files with ease
v3.1.4
Latest
Star (24)

Markdown Lint

CI State

A Github Action to run mdl on your files

Inputs

path

Path to scan for markdown files within the directory (and nested directories) mdl

filesToIgnoreRegex

A regex of files you do not want scanned, note: cannot be used with path input

Outputs

output

The output from mdl

Usage

name: markdownlint

on: [push, pull_request]

jobs:
  delivery:
    runs-on: ubuntu-latest
    steps:
    - name: Check out code
      uses: actions/checkout@v2
    - name: Run mdl
      uses: actionshub/markdownlint@main

With Ignore files

name: markdownlint

on: [push, pull_request]

jobs:
  mdl:
    runs-on: ubuntu-latest
    steps:
      - name: Check out code
        uses: actions/checkout@v2
      - name: Run Markdown Lint
        uses: actionshub/markdownlint@main
        with:
          filesToIgnoreRegex: "node_modules\\/.*"

Configuration

markdownlint can use a config file called .mdlrc this can be found in the documentation

For more complex configuration, you may wish to use a Ruby style file. In this case, your .mdlrc file should contain a link to the style file:

style '.mdl.rb'

which can contain arbitrary Ruby code:

# Enable all rules by default
all

# Extend line length, since each sentence should be on a separate line.
rule 'MD013', :line_length => 99999

# Allow in-line HTML
exclude_rule 'MD033'

# Nested lists should be indented with four spaces.
rule 'MD007', :indent => 4

More information can be found in the mdl documentation.

Markdown link checker

It may also be worth looking into a markdown link checker

MarkdownLint mdl Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Run mdl on your markdown files with ease
v3.1.4
Latest

MarkdownLint mdl Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.