Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
default_install_hook_types: [pre-commit, pre-push]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
Expand Down Expand Up @@ -39,3 +40,20 @@ repos:
hooks:
- id: shfmt
args: [-w, -i, '2', -ci, -bn]

- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.24.2
hooks:
- id: markdownlint-cli2
exclude: ^CHANGELOG\.md$

- repo: local
hooks:
- id: mkdocs-build
name: mkdocs build (plex-guide, sample config)
language: python
additional_dependencies: ['mkdocs>=1.6.1,<2', mkdocs-material, mkdocs-macros-plugin]
entry: bash -c 'cd plex-guide && cp mkdocs.sample.yml mkdocs.yml && mkdocs build -q; rc=$?; rm -rf mkdocs.yml site; exit $rc'
pass_filenames: false
files: ^plex-guide/
stages: [pre-push]
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Contributing

## Development

Run `pre-commit install` once per clone to install the commit and push hooks.

- Commit hooks run markdownlint, ShellCheck, yamllint, and the other lint checks, matching CI.
- Push hooks build the Plex guide, matching CI.
- Run everything with `pre-commit run --all-files --hook-stage pre-push`.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ The sample config uses Material for MkDocs with a dark-first palette (slate) and

## Development

Run `pre-commit install` once per clone to install the commit and push hooks. Commit hooks run markdownlint, ShellCheck, yamllint, and the other lint checks, matching CI. Push hooks build the Plex guide, matching CI. Run everything with `pre-commit run --all-files --hook-stage pre-push`.

To run the lint checks by hand:

```bash
npx markdownlint-cli2 "**/*.md"
shellcheck plex-guide/setup.sh
Expand Down
Loading