actionshub / markdownlint

Repository for the markdownlint-mdl-action Github Action

Home Page:https://github.com/marketplace/actions/markdownlint-mdl-action

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Repository for the markdownlint-mdl-action Github Action

https://github.com/marketplace/actions/markdownlint-mdl-action

License:Apache License 2.0


Languages

Language:Shell 61.4%Language:Dockerfile 34.7%Language:Ruby 3.9%