Skip to content
Draft
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ venv.bak/
# mkdocs documentation
/site

# Generated output files
comment.md

# mypy
.mypy_cache/
.dmypy.json
Expand All @@ -158,3 +161,4 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
docs/site/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ pip install markdown-checker

For more customizations read the docs.

> **Note:** When using list parameters (like `--skip-domains`, `--skip-files`, etc.), provide values as comma-separated without spaces: `--skip-domains=example.com,test.com`. Do not use square brackets or spaces after commas. See the [Advanced Usage](https://markdown-checker.readthedocs.io/en/latest/advanced/) documentation for detailed examples.

## Using `markdown-checker` in GitHub Actions

You can run this tool within a GitHub workflow using the [action-check-markdown](https://github.com/marketplace/actions/check-markdown) GitHub action.
Expand Down
77 changes: 77 additions & 0 deletions docs/source/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,33 @@

To further customize your experience with the Markdown Checker, you can utilize additional command-line interface (CLI) options.

### Working with List Parameters

Several CLI options accept lists of values (e.g., `--skip-domains`, `--skip-files`, `--extensions`, `--tracking-domains`, `--skip-urls-containing`).

**How to provide multiple values:**

Use **comma-separated values** without spaces:

```bash
markdown-checker -d . -f check_broken_urls --skip-domains=example.com,test.com
```

**Important formatting rules:**

- Values must be separated by commas with **no spaces**
- Do **not** use square brackets
- Do **not** add spaces after commas
- Quotes are optional but not required

**Examples of correct and incorrect usage:**

- ❌ Wrong: `--skip-domains=[example.com,test.com]` (square brackets not allowed)
- ❌ Wrong: `--skip-domains=example.com, test.com` (spaces not allowed)
- ❌ Wrong: `--skip-domains example.com test.com` (must use `=` and commas)
- ✅ Correct: `--skip-domains=example.com,test.com`
- ✅ Correct: `--skip-domains="example.com,test.com"` (quotes optional)

## Command Line Options

### `-d`, `--dir`
Expand Down Expand Up @@ -32,6 +59,16 @@ To further customize your experience with the Markdown Checker, you can utilize
- `.ipynb`
- **Required**: No

**Usage Examples:**

```bash
# Single value
markdown-checker -d . -f check_broken_paths --extensions=.md

# Multiple values (comma-separated, no spaces)
markdown-checker -d . -f check_broken_paths --extensions=.md,.ipynb,.txt
```

### `-td`, `--tracking-domains`

- **Type**: `list[str]`
Expand All @@ -44,6 +81,16 @@ To further customize your experience with the Markdown Checker, you can utilize
- `azure.com`
- **Required**: No

**Usage Examples:**

```bash
# Single value
markdown-checker -d . -f check_urls_tracking --tracking-domains=github.com

# Multiple values (comma-separated, no spaces)
markdown-checker -d . -f check_urls_tracking --tracking-domains=github.com,microsoft.com
```

### `-sf`, `--skip-files`

- **Type**: `list[str]`
Expand All @@ -53,13 +100,33 @@ To further customize your experience with the Markdown Checker, you can utilize
- `SECURITY.md`
- **Required**: No

**Usage Examples:**

```bash
# Single value
markdown-checker -d . -f check_broken_paths --skip-files=README.md

# Multiple values (comma-separated, no spaces)
markdown-checker -d . -f check_broken_paths --skip-files=README.md,CHANGELOG.md,LICENSE.md
```

### `-sd`, `--skip-domains`

- **Type**: `list[str]`
- **Description**: List of domains to skip checking.
- **Default**: `[]`
- **Required**: No

**Usage Examples:**

```bash
# Single value
markdown-checker -d . -f check_broken_urls --skip-domains=example.com

# Multiple values (comma-separated, no spaces)
markdown-checker -d . -f check_broken_urls --skip-domains=example.com,test.com
```

### `-suc`, `--skip-urls-containing`

- **Type**: `list[str]`
Expand All @@ -69,6 +136,16 @@ To further customize your experience with the Markdown Checker, you can utilize
- `video-embed.html`
- **Required**: No

**Usage Examples:**

```bash
# Single value
markdown-checker -d . -f check_broken_urls --skip-urls-containing=/embed/

# Multiple values (comma-separated, no spaces)
markdown-checker -d . -f check_broken_urls --skip-urls-containing=/embed/,/preview/,video-embed.html
```

### `-gu`, `--guide-url`

- **Type**: `str`
Expand Down