manuzhang / mkdocs-htmlproofer-plugin

A MkDocs plugin that validates URL in rendered html files
MIT License
43 stars 16 forks source link

Request: finer control on raise_error_excludes #10

Closed rhagenson closed 3 years ago

rhagenson commented 3 years ago

As mkdocs-htmlproofer currently works, the following:

raise_error_excludes: [504, 429, 'https://www.mkdocs.org/', 'https://www.google.com/']

will ignore all combinations of error code and URL for a total of four combinations, in this case:

I, as a user, would prefer to have more control over the combinations. Let's say I do want the above "429 on https://www.google.com/" to fail (or in other words not be part of the exclusion). Is it possible to have sub-collections perhaps like:

raise_error_excludes: 
  [
    [504, 'https://www.mkdocs.org/', 'https://www.google.com/'],
    [429, 'https://www.mkdocs.org/']
  ]

If more YAML-like is preferred (or the above is not valid YAML in the first place), perhaps:

raise_error_excludes: 
  - 504:
    - https://www.mkdocs.org/
    - https://www.google.com/
  - 429:
    - https://www.mkdocs.org/