https://github.com/actionshub/markdownlint
Repository for the markdownlint-mdl-action Github Action
https://github.com/actionshub/markdownlint
action ci github-action markdownlint terraform-managed
Last synced: 23 days ago
JSON representation
Repository for the markdownlint-mdl-action Github Action
- Host: GitHub
- URL: https://github.com/actionshub/markdownlint
- Owner: actionshub
- License: apache-2.0
- Created: 2020-01-05T10:45:53.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-12-26T22:32:38.000Z (over 1 year ago)
- Last Synced: 2024-11-05T18:32:30.942Z (7 months ago)
- Topics: action, ci, github-action, markdownlint, terraform-managed
- Language: Shell
- Homepage: https://github.com/marketplace/actions/markdownlint-mdl-action
- Size: 43.9 KB
- Stars: 24
- Watchers: 3
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Markdown Lint
[](https://github.com/actionshub/markdownlint)
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
```yaml
name: markdownlinton: [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
```yaml
name: markdownlinton: [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](https://github.com/markdownlint/markdownlint/blob/master/docs/configuration.md)
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:```sh
style '.mdl.rb'
```which can contain arbitrary Ruby code:
```rb
# 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](https://github.com/markdownlint/markdownlint/blob/master/docs/creating_styles.md).
## Markdown link checker
It may also be worth looking into a [markdown link checker](https://github.com/gaurav-nelson/github-action-markdown-link-check)