You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ This plugin can be installed via:
18
18
19
19
python -m pip install pelican-avatar
20
20
21
-
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.
21
+
As long as you have not explicitly added a `PLUGINS` setting to your Pelican settings file, the newly-installed plugin should be detected and enabled automatically. Otherwise, you must add `avatar` to your existing `PLUGINS` list. For more information, please refer to the [How to Use Plugins](https://docs.getpelican.com/en/latest/plugins.html#how-to-use-plugins) documentation.
22
22
23
23
Usage
24
24
-----
@@ -39,11 +39,11 @@ For Markdown:
39
39
Email: bart.simpson@example.com
40
40
```
41
41
42
-
The plugin first tries to find an avatar image corresponding to the specified email at Libravatar. If it is not found there, the plugin then searches Gravatar. If an avatar for the specified email address is not found at any of those services, a default picture is shown. The default for the "missing picture" can be defined in the configuration variable `AVATAR_MISSING`.
42
+
First, the plugin tries to find a corresponding avatar image for the specified email at Libravatar. If it is not found there, the plugin searches Gravatar. If an avatar is not found at either service, a default picture is shown. The “missing picture” default can be defined in the configuration variable `AVATAR_MISSING`.
43
43
44
44
### Adjusting the Template
45
45
46
-
This plugin assigns the `author_avatar` variable to the avatar image URL and makes that variable available within the article's context. For instance, you can add the following to a template file (for example, to the `article_infos.html` template file), just before the information about the author:
46
+
This plugin assigns the `author_avatar` variable to the avatar image URL and makes that variable available within the article's context. For instance, you can add the following code to a template file, such as the `article_infos.html` template file, just before the author information:
47
47
48
48
```html
49
49
{% if article.author_avatar %}
@@ -80,7 +80,7 @@ To use in common templates, such as `base.html`, you can do something like this:
80
80
{% endif %}
81
81
```
82
82
83
-
Or if you want to support optional overriding of the email address in articles or pages, while still using the global configuration if neither is available:
83
+
If you want to allow the email address to be overridden in articles or pages while still using the global configuration if neither is available, you can do so:
84
84
85
85
```html
86
86
{% if article and article.author_avatar %}
@@ -98,11 +98,11 @@ Or if you want to support optional overriding of the email address in articles o
98
98
Configuration
99
99
-------------
100
100
101
-
The following variables can be set in the Pelican settings file:
101
+
The following variables can be configured in the Pelican settings file:
102
102
103
-
-`AVATAR_AUTHOR_EMAIL`: Site-wide default for the author's email address.
103
+
-`AVATAR_AUTHOR_EMAIL`: The site-wide default for the author's email address.
104
104
105
-
-`AVATAR_MISSING`: The default for the missing picture. This can be either a URL (e.g., `"http://example.com/nobody.png"`) or the name of a library of logos (e.g., `"wavatar"`; for the full set of alternatives, see the [Libravatar API](https://wiki.libravatar.org/api/)).
105
+
-`AVATAR_MISSING`: The default for the missing picture. It can be either a URL (e.g., `"http://example.com/nobody.png"`) or the name of a logo library (e.g., `"wavatar"`. For the full set of alternatives, see the [Libravatar API](https://wiki.libravatar.org/api/)).
106
106
107
107
-`AVATAR_SIZE`: The size, in pixels, of the profile picture (it is always square, so the height is equal to the width). If not specified, the default size (80×80) is returned by Libravatar.
108
108
@@ -111,7 +111,7 @@ The following variables can be set in the Pelican settings file:
111
111
Credits
112
112
-------
113
113
114
-
Inspiration for this plugin came from the [Gravatar plugin](https://github.com/getpelican/pelican-plugins/tree/master/gravatar).
114
+
The inspiration for this plugin came from the [Gravatar plugin](https://github.com/getpelican/pelican-plugins/tree/master/gravatar).
115
115
116
116
Contributing
117
117
------------
@@ -126,7 +126,8 @@ To start contributing to this plugin, review the [Contributing to Pelican][] doc
126
126
Acknowledgments
127
127
---------------
128
128
129
-
Thanks to [Justin Mayer][] for helping with migration of this plugin under the Pelican Plugins organization, to [Troy Curtis][] for adding support for page generator and global generator context and for making improvements in the Poetry workflow, to [Lucas Cimon][] for fixes in the test suit and in the CI support, and to [Christian Clauss][] for Python 3 porting.
129
+
Thanks to [Justin Mayer][] for helping migrate of this plugin under the Pelican Plugins organization, to [Troy Curtis][] for adding support for page and global generator context and for improving the Poetry workflow (even though we are now using PDM), to [Lucas Cimon][] for fixing the test suite and providing CI support, and to [Christian Clauss][] for the Python 3 port.
0 commit comments