Skip to content
play

GitHub Action

MarkdownLint mdl Action

v3.1.4 Latest version

MarkdownLint mdl Action

play

MarkdownLint mdl Action

Run mdl on your markdown files with ease

Installation

Copy and paste the following snippet into your .yml file.

              

- name: MarkdownLint mdl Action

uses: actionshub/markdownlint@v3.1.4

Learn more about this action in actionshub/markdownlint

Choose a version

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