mkdocs-htmlproofer-plugin 1.2.1__tar.gz → 1.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mkdocs-htmlproofer-plugin-1.2.1/mkdocs_htmlproofer_plugin.egg-info → mkdocs-htmlproofer-plugin-1.3.0}/PKG-INFO +18 -1
- {mkdocs-htmlproofer-plugin-1.2.1 → mkdocs-htmlproofer-plugin-1.3.0}/README.md +17 -0
- {mkdocs-htmlproofer-plugin-1.2.1 → mkdocs-htmlproofer-plugin-1.3.0}/htmlproofer/plugin.py +8 -1
- {mkdocs-htmlproofer-plugin-1.2.1 → mkdocs-htmlproofer-plugin-1.3.0/mkdocs_htmlproofer_plugin.egg-info}/PKG-INFO +18 -1
- {mkdocs-htmlproofer-plugin-1.2.1 → mkdocs-htmlproofer-plugin-1.3.0}/setup.py +1 -1
- {mkdocs-htmlproofer-plugin-1.2.1 → mkdocs-htmlproofer-plugin-1.3.0}/LICENSE.md +0 -0
- {mkdocs-htmlproofer-plugin-1.2.1 → mkdocs-htmlproofer-plugin-1.3.0}/htmlproofer/__init__.py +0 -0
- {mkdocs-htmlproofer-plugin-1.2.1 → mkdocs-htmlproofer-plugin-1.3.0}/mkdocs_htmlproofer_plugin.egg-info/SOURCES.txt +0 -0
- {mkdocs-htmlproofer-plugin-1.2.1 → mkdocs-htmlproofer-plugin-1.3.0}/mkdocs_htmlproofer_plugin.egg-info/dependency_links.txt +0 -0
- {mkdocs-htmlproofer-plugin-1.2.1 → mkdocs-htmlproofer-plugin-1.3.0}/mkdocs_htmlproofer_plugin.egg-info/entry_points.txt +0 -0
- {mkdocs-htmlproofer-plugin-1.2.1 → mkdocs-htmlproofer-plugin-1.3.0}/mkdocs_htmlproofer_plugin.egg-info/requires.txt +0 -0
- {mkdocs-htmlproofer-plugin-1.2.1 → mkdocs-htmlproofer-plugin-1.3.0}/mkdocs_htmlproofer_plugin.egg-info/top_level.txt +0 -0
- {mkdocs-htmlproofer-plugin-1.2.1 → mkdocs-htmlproofer-plugin-1.3.0}/pyproject.toml +0 -0
- {mkdocs-htmlproofer-plugin-1.2.1 → mkdocs-htmlproofer-plugin-1.3.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mkdocs-htmlproofer-plugin
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: A MkDocs plugin that validates URL in rendered HTML files
|
|
5
5
|
Home-page: https://github.com/manuzhang/mkdocs-htmlproofer-plugin
|
|
6
6
|
Author: Manu Zhang
|
|
@@ -27,6 +27,8 @@ License-File: LICENSE.md
|
|
|
27
27
|
|
|
28
28
|
*A [MkDocs](https://www.mkdocs.org/) plugin that validates URLs, including anchors, in rendered html files*.
|
|
29
29
|
|
|
30
|
+
> Note: [MkDocs 1.6+ supports native validation of anchors](https://www.mkdocs.org/user-guide/configuration/#validation).
|
|
31
|
+
|
|
30
32
|
## Installation
|
|
31
33
|
|
|
32
34
|
0. Prerequisites
|
|
@@ -140,6 +142,21 @@ plugins:
|
|
|
140
142
|
warn_on_ignored_urls: true
|
|
141
143
|
```
|
|
142
144
|
|
|
145
|
+
### `ignore_pages`
|
|
146
|
+
|
|
147
|
+
Avoid validating the URLs on the given list of markdown pages by ignoring them altogether.
|
|
148
|
+
Each page in the list supports unix style wildcards `*`, `[]`, `?`, etc.
|
|
149
|
+
|
|
150
|
+
```yaml
|
|
151
|
+
plugins:
|
|
152
|
+
- search
|
|
153
|
+
- htmlproofer:
|
|
154
|
+
raise_error: True
|
|
155
|
+
ignore_pages:
|
|
156
|
+
- path/to/file
|
|
157
|
+
- path/to/folder/*
|
|
158
|
+
```
|
|
159
|
+
|
|
143
160
|
### `validate_external_urls`
|
|
144
161
|
|
|
145
162
|
Avoids validating any external URLs (i.e those starting with http:// or https://).
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
*A [MkDocs](https://www.mkdocs.org/) plugin that validates URLs, including anchors, in rendered html files*.
|
|
6
6
|
|
|
7
|
+
> Note: [MkDocs 1.6+ supports native validation of anchors](https://www.mkdocs.org/user-guide/configuration/#validation).
|
|
8
|
+
|
|
7
9
|
## Installation
|
|
8
10
|
|
|
9
11
|
0. Prerequisites
|
|
@@ -117,6 +119,21 @@ plugins:
|
|
|
117
119
|
warn_on_ignored_urls: true
|
|
118
120
|
```
|
|
119
121
|
|
|
122
|
+
### `ignore_pages`
|
|
123
|
+
|
|
124
|
+
Avoid validating the URLs on the given list of markdown pages by ignoring them altogether.
|
|
125
|
+
Each page in the list supports unix style wildcards `*`, `[]`, `?`, etc.
|
|
126
|
+
|
|
127
|
+
```yaml
|
|
128
|
+
plugins:
|
|
129
|
+
- search
|
|
130
|
+
- htmlproofer:
|
|
131
|
+
raise_error: True
|
|
132
|
+
ignore_pages:
|
|
133
|
+
- path/to/file
|
|
134
|
+
- path/to/folder/*
|
|
135
|
+
```
|
|
136
|
+
|
|
120
137
|
### `validate_external_urls`
|
|
121
138
|
|
|
122
139
|
Avoids validating any external URLs (i.e those starting with http:// or https://).
|
|
@@ -70,6 +70,7 @@ class HtmlProoferPlugin(BasePlugin):
|
|
|
70
70
|
('validate_rendered_template', config_options.Type(bool, default=False)),
|
|
71
71
|
('ignore_urls', config_options.Type(list, default=[])),
|
|
72
72
|
('warn_on_ignored_urls', config_options.Type(bool, default=False)),
|
|
73
|
+
('ignore_pages', config_options.Type(list, default=[])),
|
|
73
74
|
)
|
|
74
75
|
|
|
75
76
|
def __init__(self):
|
|
@@ -123,6 +124,12 @@ class HtmlProoferPlugin(BasePlugin):
|
|
|
123
124
|
if any(fnmatch.fnmatch(url, ignore_url) for ignore_url in self.config['ignore_urls']):
|
|
124
125
|
if self.config['warn_on_ignored_urls']:
|
|
125
126
|
log_warning(f"ignoring URL {url} from {page.file.src_path}")
|
|
127
|
+
elif any(
|
|
128
|
+
fnmatch.fnmatch(page.file.src_path, ignore_page)
|
|
129
|
+
for ignore_page in self.config['ignore_pages']
|
|
130
|
+
):
|
|
131
|
+
if self.config['warn_on_ignored_urls']:
|
|
132
|
+
log_warning(f"ignoring URL {url} from {page.file.src_path}")
|
|
126
133
|
else:
|
|
127
134
|
url_status = self.get_url_status(url, page.file.src_path, all_element_ids, opt_files)
|
|
128
135
|
if self.bad_url(url_status) and self.is_error(self.config, url, url_status):
|
|
@@ -152,7 +159,7 @@ class HtmlProoferPlugin(BasePlugin):
|
|
|
152
159
|
|
|
153
160
|
if self.config['skip_downloads'] is False:
|
|
154
161
|
# Download the entire contents as to not break previous behaviour.
|
|
155
|
-
for _ in response.iter_content(chunk_size=1024):
|
|
162
|
+
for _ in response.iter_content(chunk_size=1024 * 1024):
|
|
156
163
|
pass
|
|
157
164
|
|
|
158
165
|
return response.status_code
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mkdocs-htmlproofer-plugin
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: A MkDocs plugin that validates URL in rendered HTML files
|
|
5
5
|
Home-page: https://github.com/manuzhang/mkdocs-htmlproofer-plugin
|
|
6
6
|
Author: Manu Zhang
|
|
@@ -27,6 +27,8 @@ License-File: LICENSE.md
|
|
|
27
27
|
|
|
28
28
|
*A [MkDocs](https://www.mkdocs.org/) plugin that validates URLs, including anchors, in rendered html files*.
|
|
29
29
|
|
|
30
|
+
> Note: [MkDocs 1.6+ supports native validation of anchors](https://www.mkdocs.org/user-guide/configuration/#validation).
|
|
31
|
+
|
|
30
32
|
## Installation
|
|
31
33
|
|
|
32
34
|
0. Prerequisites
|
|
@@ -140,6 +142,21 @@ plugins:
|
|
|
140
142
|
warn_on_ignored_urls: true
|
|
141
143
|
```
|
|
142
144
|
|
|
145
|
+
### `ignore_pages`
|
|
146
|
+
|
|
147
|
+
Avoid validating the URLs on the given list of markdown pages by ignoring them altogether.
|
|
148
|
+
Each page in the list supports unix style wildcards `*`, `[]`, `?`, etc.
|
|
149
|
+
|
|
150
|
+
```yaml
|
|
151
|
+
plugins:
|
|
152
|
+
- search
|
|
153
|
+
- htmlproofer:
|
|
154
|
+
raise_error: True
|
|
155
|
+
ignore_pages:
|
|
156
|
+
- path/to/file
|
|
157
|
+
- path/to/folder/*
|
|
158
|
+
```
|
|
159
|
+
|
|
143
160
|
### `validate_external_urls`
|
|
144
161
|
|
|
145
162
|
Avoids validating any external URLs (i.e those starting with http:// or https://).
|
|
@@ -9,7 +9,7 @@ def read(fname: str):
|
|
|
9
9
|
|
|
10
10
|
setup(
|
|
11
11
|
name='mkdocs-htmlproofer-plugin',
|
|
12
|
-
version='1.
|
|
12
|
+
version='1.3.0',
|
|
13
13
|
description='A MkDocs plugin that validates URL in rendered HTML files',
|
|
14
14
|
long_description=read('README.md'),
|
|
15
15
|
long_description_content_type='text/markdown',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|