pelican-linkclass 2.1.4__tar.gz → 2.1.5__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.
Potentially problematic release.
This version of pelican-linkclass might be problematic. Click here for more details.
- {pelican_linkclass-2.1.4 → pelican_linkclass-2.1.5}/CHANGELOG.md +5 -0
- {pelican_linkclass-2.1.4 → pelican_linkclass-2.1.5}/PKG-INFO +27 -31
- {pelican_linkclass-2.1.4 → pelican_linkclass-2.1.5}/README.md +20 -25
- {pelican_linkclass-2.1.4 → pelican_linkclass-2.1.5}/pelican/plugins/linkclass/linkclass.py +0 -1
- {pelican_linkclass-2.1.4 → pelican_linkclass-2.1.5}/pelican/plugins/linkclass/mdx_linkclass.py +2 -3
- {pelican_linkclass-2.1.4 → pelican_linkclass-2.1.5}/pelican/plugins/linkclass/test_linkclass.py +16 -37
- {pelican_linkclass-2.1.4 → pelican_linkclass-2.1.5}/pyproject.toml +13 -12
- {pelican_linkclass-2.1.4 → pelican_linkclass-2.1.5}/CONTRIBUTING.md +0 -0
- {pelican_linkclass-2.1.4 → pelican_linkclass-2.1.5}/LICENSE +0 -0
- {pelican_linkclass-2.1.4 → pelican_linkclass-2.1.5}/external-link.png +0 -0
- {pelican_linkclass-2.1.4 → pelican_linkclass-2.1.5}/linkclass-example.png +0 -0
- {pelican_linkclass-2.1.4 → pelican_linkclass-2.1.5}/pelican/plugins/linkclass/__init__.py +0 -0
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
CHANGELOG
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
2.1.5 - 2025-01-20
|
|
5
|
+
------------------
|
|
6
|
+
|
|
7
|
+
This is a maintenance release. No user-visible changes have been made. This release tests the new system to keep alignment with plugin template via Cruft.
|
|
8
|
+
|
|
4
9
|
2.1.4 - 2024-04-14
|
|
5
10
|
------------------
|
|
6
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pelican-linkclass
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.5
|
|
4
4
|
Summary: Pelican plugin to set anchor tag's class attribute to differentiate between internal and external links
|
|
5
5
|
Keywords: pelican,plugin,link class
|
|
6
6
|
Author-Email: =?utf-8?q?Rafael_Laboissi=C3=A8re?= <rafael@laboissiere.net>
|
|
@@ -10,24 +10,25 @@ Classifier: Environment :: Console
|
|
|
10
10
|
Classifier: Framework :: Pelican
|
|
11
11
|
Classifier: Framework :: Pelican :: Plugins
|
|
12
12
|
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
-
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
13
|
+
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
14
14
|
Classifier: Operating System :: OS Independent
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
21
|
Classifier: Topic :: Internet :: WWW/HTTP
|
|
22
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
23
|
Project-URL: Homepage, https://github.com/pelican-plugins/linkclass
|
|
24
|
-
Project-URL: Issue
|
|
24
|
+
Project-URL: Issue Tracker, https://github.com/pelican-plugins/linkclass/issues
|
|
25
|
+
Project-URL: Changelog, https://github.com/pelican-plugins/linkclass/blob/main/CHANGELOG.md
|
|
25
26
|
Project-URL: Funding, https://donate.getpelican.com/
|
|
26
|
-
Requires-Python: <4.0,>=3.
|
|
27
|
+
Requires-Python: <4.0,>=3.9
|
|
27
28
|
Requires-Dist: pelican>=4.5
|
|
28
29
|
Requires-Dist: py3dns>=3.2
|
|
29
|
-
Requires-Dist: markdown>=3.4; extra == "markdown"
|
|
30
30
|
Provides-Extra: markdown
|
|
31
|
+
Requires-Dist: markdown>=3.4; extra == "markdown"
|
|
31
32
|
Description-Content-Type: text/markdown
|
|
32
33
|
|
|
33
34
|
Link Class: A Plugin for Pelican
|
|
@@ -35,55 +36,49 @@ Link Class: A Plugin for Pelican
|
|
|
35
36
|
|
|
36
37
|
[](https://github.com/pelican-plugins/linkclass/actions)
|
|
37
38
|
[](https://pypi.org/project/pelican-linkclass/)
|
|
38
|
-

|
|
39
|
+
[](https://www.gnu.org/licenses/agpl-3.0.en.html)
|
|
40
|
+
|
|
41
|
+
This Pelican plugin allows you to set the class attribute of `<a>` elements (generated in Markdown by `[ext](link)`) according to whether the link is external (i.e., starts with `http://` or `https://`) or internal to the Pelican-generated site.
|
|
39
42
|
|
|
40
|
-
|
|
41
|
-
(generated in Markdown by `[ext](link)`) according to whether the link is
|
|
42
|
-
external (i.e., starts with `http://` or `https://`) or internal to the
|
|
43
|
-
Pelican-generated site.
|
|
43
|
+
For now, this plugin only works with Markdown. It has been tested with version 3.0+ of the Python-Markdown module and may not work with previous versions.
|
|
44
44
|
|
|
45
|
-
For now, this plugin only works with Markdown. It has been tested with version
|
|
46
|
-
3.0+ of the Python-Markdown module and may not work with previous versions.
|
|
47
45
|
|
|
48
46
|
Installation
|
|
49
47
|
------------
|
|
50
48
|
|
|
51
|
-
This plugin [is available as a package](https://pypi.org/project/pelican-linkclass/)
|
|
52
|
-
at PyPI and can be installed via:
|
|
49
|
+
This plugin [is available as a package](https://pypi.org/project/pelican-linkclass/) at PyPI and can be installed via:
|
|
53
50
|
|
|
54
51
|
```
|
|
55
52
|
python -m pip install pelican-linkclass
|
|
56
53
|
```
|
|
57
54
|
|
|
55
|
+
As long as you have not explicitly added a `PLUGINS` setting to your Pelican settings file, then the newly-installed plugin should be automatically detected and enabled. Otherwise, you must add `avatar` to your existing `PLUGINS` list. For more information, please see the [How to Use Plugins](https://docs.getpelican.com/en/latest/plugins.html#how-to-use-plugins) documentation.
|
|
56
|
+
|
|
57
|
+
|
|
58
58
|
Configuration
|
|
59
59
|
-------------
|
|
60
60
|
|
|
61
|
-
In order to avoid clashes with already-defined classes in the user CSS
|
|
62
|
-
style sheets, it is possible to specify the name of the classes that will
|
|
63
|
-
be used. They can be specified in the Pelican setting file with the
|
|
64
|
-
`LINKCLASS` variable, which must be defined as a list of tuples, like this:
|
|
61
|
+
In order to avoid clashes with already-defined classes in the user CSS style sheets, it is possible to specify the name of the classes that will be used. They can be specified in the Pelican setting file with the `LINKCLASS` variable, which must be defined as a list of tuples, like this:
|
|
65
62
|
|
|
66
63
|
```python
|
|
67
64
|
'LINKCLASS' = (('EXTERNAL_CLASS', 'name-of-the-class-for-external-links'),
|
|
68
65
|
('INTERNAL_CLASS', 'name-of-the-class-for-internal-links'))
|
|
69
66
|
```
|
|
70
67
|
|
|
71
|
-
The default values for `EXTERNAL_CLASS` and `INTERNAL_CLASS` are,
|
|
72
|
-
|
|
68
|
+
The default values for `EXTERNAL_CLASS` and `INTERNAL_CLASS` are, respectively, `'external'` and `'internal'`.
|
|
69
|
+
|
|
73
70
|
|
|
74
71
|
Styling Hyperlinks
|
|
75
72
|
------------------
|
|
76
73
|
|
|
77
|
-
One of the possible uses of this plugins is for styling. Suppose that we
|
|
78
|
-
have the following Markdown content in your article:
|
|
74
|
+
One of the possible uses of this plugins is for styling. Suppose that we have the following Markdown content in your article:
|
|
79
75
|
|
|
80
76
|
```markdown
|
|
81
77
|
This is an [internal](internal) link and this is an
|
|
82
78
|
[external](http://external.com) link.
|
|
83
79
|
```
|
|
84
80
|
|
|
85
|
-
If the default configuration variable values are used, then one possible
|
|
86
|
-
CSS setting could be:
|
|
81
|
+
If the default configuration variable values are used, then one possible CSS setting could be:
|
|
87
82
|
|
|
88
83
|
```css
|
|
89
84
|
a.external:before {
|
|
@@ -92,16 +87,13 @@ a.external:before {
|
|
|
92
87
|
}
|
|
93
88
|
```
|
|
94
89
|
|
|
95
|
-
(The file `external-link.png` is also distributed with this plugin. To use it,
|
|
96
|
-
copy it to the appropriate place in your web site source tree, for instance
|
|
97
|
-
in `theme/static/images/`.)
|
|
90
|
+
(The file `external-link.png` is also distributed with this plugin. To use it, copy it to the appropriate place in your web site source tree, for instance in `theme/static/images/`.)
|
|
98
91
|
|
|
99
92
|
Then, the result will look like the following:
|
|
100
93
|
|
|
101
94
|

|
|
102
95
|
|
|
103
|
-
Note that this plugin also works with reference-style links, as in the
|
|
104
|
-
following example:
|
|
96
|
+
Note that this plugin also works with reference-style links, as in the following example:
|
|
105
97
|
|
|
106
98
|
```markdown
|
|
107
99
|
This is an [internal][internal] link and this is an
|
|
@@ -111,6 +103,7 @@ This is an [internal][internal] link and this is an
|
|
|
111
103
|
[external]: http://external.com
|
|
112
104
|
```
|
|
113
105
|
|
|
106
|
+
|
|
114
107
|
Contributing
|
|
115
108
|
------------
|
|
116
109
|
|
|
@@ -121,6 +114,7 @@ To start contributing to this plugin, review the [Contributing to Pelican][] doc
|
|
|
121
114
|
[existing issues]: https://github.com/pelican-plugins/linkclass/issues
|
|
122
115
|
[Contributing to Pelican]: https://docs.getpelican.com/en/latest/contribute.html
|
|
123
116
|
|
|
117
|
+
|
|
124
118
|
Acknowledgments
|
|
125
119
|
---------------
|
|
126
120
|
|
|
@@ -132,10 +126,12 @@ Many thanks to [Yuliya Bagriy][] for setting up the package for [PyPI][], to [Lu
|
|
|
132
126
|
[pytest]: https://pytest.org/
|
|
133
127
|
[Justin Mayer]: https://github.com/justinmayer
|
|
134
128
|
|
|
129
|
+
|
|
135
130
|
Author
|
|
136
131
|
------
|
|
137
132
|
|
|
138
|
-
Copyright © 2015, 2017, 2019, 2021-2023 Rafael Laboissière (<rafael@laboissiere.net>)
|
|
133
|
+
Copyright © 2015, 2017, 2019, 2021-2023, 2025 Rafael Laboissière (<rafael@laboissiere.net>)
|
|
134
|
+
|
|
139
135
|
|
|
140
136
|
License
|
|
141
137
|
-------
|
|
@@ -3,55 +3,49 @@ Link Class: A Plugin for Pelican
|
|
|
3
3
|
|
|
4
4
|
[](https://github.com/pelican-plugins/linkclass/actions)
|
|
5
5
|
[](https://pypi.org/project/pelican-linkclass/)
|
|
6
|
-

|
|
6
|
+
[](https://www.gnu.org/licenses/agpl-3.0.en.html)
|
|
7
7
|
|
|
8
|
-
This Pelican plugin allows you to set the class attribute of `<a>` elements
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Pelican-generated site.
|
|
8
|
+
This Pelican plugin allows you to set the class attribute of `<a>` elements (generated in Markdown by `[ext](link)`) according to whether the link is external (i.e., starts with `http://` or `https://`) or internal to the Pelican-generated site.
|
|
9
|
+
|
|
10
|
+
For now, this plugin only works with Markdown. It has been tested with version 3.0+ of the Python-Markdown module and may not work with previous versions.
|
|
12
11
|
|
|
13
|
-
For now, this plugin only works with Markdown. It has been tested with version
|
|
14
|
-
3.0+ of the Python-Markdown module and may not work with previous versions.
|
|
15
12
|
|
|
16
13
|
Installation
|
|
17
14
|
------------
|
|
18
15
|
|
|
19
|
-
This plugin [is available as a package](https://pypi.org/project/pelican-linkclass/)
|
|
20
|
-
at PyPI and can be installed via:
|
|
16
|
+
This plugin [is available as a package](https://pypi.org/project/pelican-linkclass/) at PyPI and can be installed via:
|
|
21
17
|
|
|
22
18
|
```
|
|
23
19
|
python -m pip install pelican-linkclass
|
|
24
20
|
```
|
|
25
21
|
|
|
22
|
+
As long as you have not explicitly added a `PLUGINS` setting to your Pelican settings file, then the newly-installed plugin should be automatically detected and enabled. Otherwise, you must add `avatar` to your existing `PLUGINS` list. For more information, please see the [How to Use Plugins](https://docs.getpelican.com/en/latest/plugins.html#how-to-use-plugins) documentation.
|
|
23
|
+
|
|
24
|
+
|
|
26
25
|
Configuration
|
|
27
26
|
-------------
|
|
28
27
|
|
|
29
|
-
In order to avoid clashes with already-defined classes in the user CSS
|
|
30
|
-
style sheets, it is possible to specify the name of the classes that will
|
|
31
|
-
be used. They can be specified in the Pelican setting file with the
|
|
32
|
-
`LINKCLASS` variable, which must be defined as a list of tuples, like this:
|
|
28
|
+
In order to avoid clashes with already-defined classes in the user CSS style sheets, it is possible to specify the name of the classes that will be used. They can be specified in the Pelican setting file with the `LINKCLASS` variable, which must be defined as a list of tuples, like this:
|
|
33
29
|
|
|
34
30
|
```python
|
|
35
31
|
'LINKCLASS' = (('EXTERNAL_CLASS', 'name-of-the-class-for-external-links'),
|
|
36
32
|
('INTERNAL_CLASS', 'name-of-the-class-for-internal-links'))
|
|
37
33
|
```
|
|
38
34
|
|
|
39
|
-
The default values for `EXTERNAL_CLASS` and `INTERNAL_CLASS` are,
|
|
40
|
-
|
|
35
|
+
The default values for `EXTERNAL_CLASS` and `INTERNAL_CLASS` are, respectively, `'external'` and `'internal'`.
|
|
36
|
+
|
|
41
37
|
|
|
42
38
|
Styling Hyperlinks
|
|
43
39
|
------------------
|
|
44
40
|
|
|
45
|
-
One of the possible uses of this plugins is for styling. Suppose that we
|
|
46
|
-
have the following Markdown content in your article:
|
|
41
|
+
One of the possible uses of this plugins is for styling. Suppose that we have the following Markdown content in your article:
|
|
47
42
|
|
|
48
43
|
```markdown
|
|
49
44
|
This is an [internal](internal) link and this is an
|
|
50
45
|
[external](http://external.com) link.
|
|
51
46
|
```
|
|
52
47
|
|
|
53
|
-
If the default configuration variable values are used, then one possible
|
|
54
|
-
CSS setting could be:
|
|
48
|
+
If the default configuration variable values are used, then one possible CSS setting could be:
|
|
55
49
|
|
|
56
50
|
```css
|
|
57
51
|
a.external:before {
|
|
@@ -60,16 +54,13 @@ a.external:before {
|
|
|
60
54
|
}
|
|
61
55
|
```
|
|
62
56
|
|
|
63
|
-
(The file `external-link.png` is also distributed with this plugin. To use it,
|
|
64
|
-
copy it to the appropriate place in your web site source tree, for instance
|
|
65
|
-
in `theme/static/images/`.)
|
|
57
|
+
(The file `external-link.png` is also distributed with this plugin. To use it, copy it to the appropriate place in your web site source tree, for instance in `theme/static/images/`.)
|
|
66
58
|
|
|
67
59
|
Then, the result will look like the following:
|
|
68
60
|
|
|
69
61
|

|
|
70
62
|
|
|
71
|
-
Note that this plugin also works with reference-style links, as in the
|
|
72
|
-
following example:
|
|
63
|
+
Note that this plugin also works with reference-style links, as in the following example:
|
|
73
64
|
|
|
74
65
|
```markdown
|
|
75
66
|
This is an [internal][internal] link and this is an
|
|
@@ -79,6 +70,7 @@ This is an [internal][internal] link and this is an
|
|
|
79
70
|
[external]: http://external.com
|
|
80
71
|
```
|
|
81
72
|
|
|
73
|
+
|
|
82
74
|
Contributing
|
|
83
75
|
------------
|
|
84
76
|
|
|
@@ -89,6 +81,7 @@ To start contributing to this plugin, review the [Contributing to Pelican][] doc
|
|
|
89
81
|
[existing issues]: https://github.com/pelican-plugins/linkclass/issues
|
|
90
82
|
[Contributing to Pelican]: https://docs.getpelican.com/en/latest/contribute.html
|
|
91
83
|
|
|
84
|
+
|
|
92
85
|
Acknowledgments
|
|
93
86
|
---------------
|
|
94
87
|
|
|
@@ -100,10 +93,12 @@ Many thanks to [Yuliya Bagriy][] for setting up the package for [PyPI][], to [Lu
|
|
|
100
93
|
[pytest]: https://pytest.org/
|
|
101
94
|
[Justin Mayer]: https://github.com/justinmayer
|
|
102
95
|
|
|
96
|
+
|
|
103
97
|
Author
|
|
104
98
|
------
|
|
105
99
|
|
|
106
|
-
Copyright © 2015, 2017, 2019, 2021-2023 Rafael Laboissière (<rafael@laboissiere.net>)
|
|
100
|
+
Copyright © 2015, 2017, 2019, 2021-2023, 2025 Rafael Laboissière (<rafael@laboissiere.net>)
|
|
101
|
+
|
|
107
102
|
|
|
108
103
|
License
|
|
109
104
|
-------
|
{pelican_linkclass-2.1.4 → pelican_linkclass-2.1.5}/pelican/plugins/linkclass/mdx_linkclass.py
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Markdown extension for the Link Class plugin for Pelican."""
|
|
2
2
|
|
|
3
|
-
# Copyright (C) 2015, 2017, 2019, 2023 Rafael Laboissière
|
|
3
|
+
# Copyright (C) 2015, 2017, 2019, 2023, 2025 Rafael Laboissière
|
|
4
4
|
#
|
|
5
5
|
# This program is free software: you can redistribute it and/or modify it
|
|
6
6
|
# under the terms of the GNU General Affero Public License as published by
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
# You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
# along with this program. If not, see http://www.gnu.org/licenses/.
|
|
17
17
|
|
|
18
|
-
|
|
19
18
|
import re
|
|
20
19
|
|
|
21
20
|
from markdown.extensions import Extension
|
|
@@ -37,7 +36,7 @@ def add_class(elm, config):
|
|
|
37
36
|
"""Utlity function for adding the appropriate class attribute."""
|
|
38
37
|
try:
|
|
39
38
|
m = re.match("^https?://", elm.get("href"))
|
|
40
|
-
elm.set("class", m and config["EXTERNAL_CLASS"] or config["INTERNAL_CLASS"])
|
|
39
|
+
elm.set("class", (m and config["EXTERNAL_CLASS"]) or config["INTERNAL_CLASS"])
|
|
41
40
|
except AttributeError:
|
|
42
41
|
pass
|
|
43
42
|
return elm
|
{pelican_linkclass-2.1.4 → pelican_linkclass-2.1.5}/pelican/plugins/linkclass/test_linkclass.py
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Unit testing suite for the Link Class Plugin."""
|
|
2
2
|
|
|
3
|
-
# Copyright (C) 2015, 2017, 2019, 2021-2023 Rafael Laboissière <rafael@laboissiere.net> # noqa: E501
|
|
3
|
+
# Copyright (C) 2015, 2017, 2019, 2021-2023, 2025 Rafael Laboissière <rafael@laboissiere.net> # noqa: E501
|
|
4
4
|
#
|
|
5
5
|
# This program is free software: you can redistribute it and/or modify it
|
|
6
6
|
# under the terms of the GNU General Affero Public License as published by
|
|
@@ -65,6 +65,7 @@ class TestLinkClass(unittest.TestCase):
|
|
|
65
65
|
"""Class for testing the <a> output elements generated by the Link Class plugin."""
|
|
66
66
|
|
|
67
67
|
def setUp(self, override=None):
|
|
68
|
+
"""Initialize the configuration."""
|
|
68
69
|
self.output_path = mkdtemp(prefix=TEST_DIR_PREFIX)
|
|
69
70
|
self.content_path = mkdtemp(prefix=TEST_DIR_PREFIX)
|
|
70
71
|
settings = {
|
|
@@ -87,44 +88,22 @@ class TestLinkClass(unittest.TestCase):
|
|
|
87
88
|
os.path.join(self.content_path, f"{TEST_FILE_STEM}.md"),
|
|
88
89
|
"w",
|
|
89
90
|
) as fid:
|
|
90
|
-
|
|
91
|
+
fid.write(f"""Title: Test
|
|
91
92
|
Date: 1970-01-01
|
|
92
93
|
|
|
93
|
-
This is an [{}]({}), inline-style link.
|
|
94
|
-
This is an [{}]({}), inline-style link (with http URL).
|
|
95
|
-
This is an [{}]({}), inline-style link (with https URL).
|
|
96
|
-
|
|
97
|
-
This is an [{}][{}], reference-style link.
|
|
98
|
-
This is an [{}][{}], reference-style link (with http URL).
|
|
99
|
-
This is an [{}][{}], reference-style link (with https URL).
|
|
100
|
-
|
|
101
|
-
[{}]: {}
|
|
102
|
-
[{}]: {}
|
|
103
|
-
[{}]: {}
|
|
104
|
-
|
|
105
|
-
"""
|
|
106
|
-
fid.write(
|
|
107
|
-
template.format(
|
|
108
|
-
INTERNAL_INLINE_TEXT,
|
|
109
|
-
INTERNAL_INLINE_LINK,
|
|
110
|
-
EXTERNAL_INLINE_TEXT_HTTP,
|
|
111
|
-
EXTERNAL_INLINE_LINK_HTTP,
|
|
112
|
-
EXTERNAL_INLINE_TEXT_HTTPS,
|
|
113
|
-
EXTERNAL_INLINE_LINK_HTTP,
|
|
114
|
-
INTERNAL_REFERENCE_TEXT,
|
|
115
|
-
INTERNAL_REFERENCE_LABEL,
|
|
116
|
-
EXTERNAL_REFERENCE_TEXT_HTTP,
|
|
117
|
-
EXTERNAL_REFERENCE_LABEL_HTTP,
|
|
118
|
-
EXTERNAL_REFERENCE_TEXT_HTTPS,
|
|
119
|
-
EXTERNAL_REFERENCE_LABEL_HTTPS,
|
|
120
|
-
INTERNAL_REFERENCE_LABEL,
|
|
121
|
-
INTERNAL_REFERENCE_LINK,
|
|
122
|
-
EXTERNAL_REFERENCE_LABEL_HTTP,
|
|
123
|
-
EXTERNAL_REFERENCE_LINK_HTTP,
|
|
124
|
-
EXTERNAL_REFERENCE_LABEL_HTTPS,
|
|
125
|
-
EXTERNAL_REFERENCE_LINK_HTTPS,
|
|
126
|
-
)
|
|
127
|
-
)
|
|
94
|
+
This is an [{INTERNAL_INLINE_TEXT}]({INTERNAL_INLINE_LINK}), inline-style link.
|
|
95
|
+
This is an [{EXTERNAL_INLINE_TEXT_HTTP}]({EXTERNAL_INLINE_LINK_HTTP}), inline-style link (with http URL).
|
|
96
|
+
This is an [{EXTERNAL_INLINE_TEXT_HTTPS}]({EXTERNAL_INLINE_LINK_HTTP}), inline-style link (with https URL).
|
|
97
|
+
|
|
98
|
+
This is an [{INTERNAL_REFERENCE_TEXT}][{INTERNAL_REFERENCE_LABEL}], reference-style link.
|
|
99
|
+
This is an [{EXTERNAL_REFERENCE_TEXT_HTTP}][{EXTERNAL_REFERENCE_LABEL_HTTP}], reference-style link (with http URL).
|
|
100
|
+
This is an [{EXTERNAL_REFERENCE_TEXT_HTTPS}][{EXTERNAL_REFERENCE_LABEL_HTTPS}], reference-style link (with https URL).
|
|
101
|
+
|
|
102
|
+
[{INTERNAL_REFERENCE_LABEL}]: {INTERNAL_REFERENCE_LINK}
|
|
103
|
+
[{EXTERNAL_REFERENCE_LABEL_HTTP}]: {EXTERNAL_REFERENCE_LINK_HTTP}
|
|
104
|
+
[{EXTERNAL_REFERENCE_LABEL_HTTPS}]: {EXTERNAL_REFERENCE_LINK_HTTPS}
|
|
105
|
+
|
|
106
|
+
""")
|
|
128
107
|
|
|
129
108
|
# Run the Pelican instance
|
|
130
109
|
self.settings = read_settings(override=settings)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pelican-linkclass"
|
|
3
|
-
version = "2.1.
|
|
3
|
+
version = "2.1.5"
|
|
4
4
|
description = "Pelican plugin to set anchor tag's class attribute to differentiate between internal and external links"
|
|
5
5
|
authors = [
|
|
6
6
|
{ name = "Rafael Laboissière", email = "rafael@laboissiere.net" },
|
|
@@ -17,18 +17,18 @@ classifiers = [
|
|
|
17
17
|
"Framework :: Pelican",
|
|
18
18
|
"Framework :: Pelican :: Plugins",
|
|
19
19
|
"Intended Audience :: End Users/Desktop",
|
|
20
|
-
"License :: OSI Approved :: GNU Affero General Public License v3
|
|
20
|
+
"License :: OSI Approved :: GNU Affero General Public License v3",
|
|
21
21
|
"Operating System :: OS Independent",
|
|
22
22
|
"Programming Language :: Python :: 3",
|
|
23
|
-
"Programming Language :: Python :: 3.8",
|
|
24
23
|
"Programming Language :: Python :: 3.9",
|
|
25
24
|
"Programming Language :: Python :: 3.10",
|
|
26
25
|
"Programming Language :: Python :: 3.11",
|
|
27
26
|
"Programming Language :: Python :: 3.12",
|
|
27
|
+
"Programming Language :: Python :: 3.13",
|
|
28
28
|
"Topic :: Internet :: WWW/HTTP",
|
|
29
29
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
30
30
|
]
|
|
31
|
-
requires-python = ">=3.
|
|
31
|
+
requires-python = ">=3.9,<4.0"
|
|
32
32
|
dependencies = [
|
|
33
33
|
"pelican>=4.5",
|
|
34
34
|
"py3dns>=3.2",
|
|
@@ -40,6 +40,7 @@ text = "AGPL-3.0"
|
|
|
40
40
|
[project.urls]
|
|
41
41
|
Homepage = "https://github.com/pelican-plugins/linkclass"
|
|
42
42
|
"Issue Tracker" = "https://github.com/pelican-plugins/linkclass/issues"
|
|
43
|
+
Changelog = "https://github.com/pelican-plugins/linkclass/blob/main/CHANGELOG.md"
|
|
43
44
|
Funding = "https://donate.getpelican.com/"
|
|
44
45
|
|
|
45
46
|
[project.optional-dependencies]
|
|
@@ -47,17 +48,17 @@ markdown = [
|
|
|
47
48
|
"markdown>=3.4",
|
|
48
49
|
]
|
|
49
50
|
|
|
50
|
-
[
|
|
51
|
+
[dependency-groups]
|
|
51
52
|
lint = [
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"ruff>=0.1.3",
|
|
53
|
+
"invoke>=2.2",
|
|
54
|
+
"ruff>=0.9.1,<1.0.0",
|
|
55
55
|
]
|
|
56
56
|
test = [
|
|
57
|
+
"invoke>=2.2",
|
|
57
58
|
"markdown>=3.4",
|
|
58
59
|
"pytest>=7.0",
|
|
59
60
|
"pytest-cov>=4.0",
|
|
60
|
-
"pytest-sugar>=0
|
|
61
|
+
"pytest-sugar>=1.0",
|
|
61
62
|
]
|
|
62
63
|
|
|
63
64
|
[tool.pdm.build]
|
|
@@ -80,7 +81,7 @@ git-username = "botpub"
|
|
|
80
81
|
git-email = "52496925+botpub@users.noreply.github.com"
|
|
81
82
|
append-github-contributor = true
|
|
82
83
|
|
|
83
|
-
[tool.ruff]
|
|
84
|
+
[tool.ruff.lint]
|
|
84
85
|
select = [
|
|
85
86
|
"B",
|
|
86
87
|
"BLE",
|
|
@@ -106,13 +107,13 @@ select = [
|
|
|
106
107
|
]
|
|
107
108
|
ignore = [
|
|
108
109
|
"D100",
|
|
109
|
-
"D102",
|
|
110
110
|
"D104",
|
|
111
111
|
"D203",
|
|
112
112
|
"D213",
|
|
113
|
+
"ISC001",
|
|
113
114
|
]
|
|
114
115
|
|
|
115
|
-
[tool.ruff.isort]
|
|
116
|
+
[tool.ruff.lint.isort]
|
|
116
117
|
combine-as-imports = true
|
|
117
118
|
force-sort-within-sections = true
|
|
118
119
|
known-first-party = [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|