Skip to content

Commit 6a6484f

Browse files
committed
support for pelican-statistics added
1 parent 6bb3409 commit 6a6484f

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

README.adoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ folder name
6767
* Navigation support
6868
* Paralax cover images for posts, author archives and blog
6969
* Author informations for posts and author archives
70-
* Featured posts (via
71-
https://github.com/getpelican/pelican-plugins/tree/master/neighbors[plugin])
70+
* Featured posts (via https://github.com/pelican-plugins/neighbors[plugin])
7271
* Reading progress for posts
7372
* Automatic code syntax highlight
7473
* Disqus support

pyproject.toml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,15 @@ classifiers = [
3737
]
3838

3939
dependencies = [
40-
"pelican == 4.10.2",
41-
"pelican-image-process == 3.0.4",
42-
"pelican-minify == 2.0.0",
43-
"pelican-neighbors == 1.2.0",
44-
"pelican-related-posts == 1.0.0",
45-
"pelican-seo == 1.2.2",
46-
"pelican-sitemap == 1.2.0",
47-
"pelican-webassets == 2.1.0",
40+
"pelican >= 4.10.2",
41+
"pelican-image-process >= 3.0.4",
42+
"pelican-minify >= 2.0.0",
43+
"pelican-neighbors >= 1.2.0",
44+
"pelican-related-posts >= 1.0.0",
45+
"pelican-seo >= 1.2.2",
46+
"pelican-sitemap >= 1.2.0",
47+
"pelican-statistics >= 1.0.0",
48+
"pelican-webassets >= 2.1.0",
4849
]
4950

5051
[project.urls]

templates/article.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ <h4 class="post-meta-author">
121121
{% if article.modified and SHOW_ARTICLE_MODIFIED_TIME|default(False) %}
122122
&bull; <time datetime="{{ article.locale_modified }}"> Updated on {{ article.locale_modified }}</time>
123123
{% endif %}
124-
{% if article.stats and 'read_mins' in article.stats %}
124+
{% if article.statistics and 'read_mins' in article.statistics %}
125+
&bull; {{ article.statistics['read_mins'] }} min read
126+
{% elif article.stats and 'read_mins' in article.stats %}
125127
&bull; {{ article.stats['read_mins'] }} min read
126128
{% endif %}
127129
</div>

tests/default_conf.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,13 @@
8181

8282
### Plugins
8383

84-
# PLUGIN_PATHS = [
85-
# 'pelican-plugins'
86-
# ]
87-
88-
# PLUGINS = [
89-
# 'sitemap',
90-
# 'neighbors',
91-
# 'assets'
92-
# ]
84+
PLUGINS = [
85+
"pelican.plugins.neighbors",
86+
"pelican.plugins.related_posts",
87+
"pelican.plugins.sitemap",
88+
"pelican.plugins.statistics",
89+
"pelican.plugins.webassets",
90+
]
9391

9492
# Sitemap
9593
SITEMAP = {

0 commit comments

Comments
 (0)