Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
play

GitHub Action

MarkdownLint mdl Action

2.0.2

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@2.0.2

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@main
    - name: Run mdl
      uses: actionshub/markdownlint@main

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