Skip to content

Commit

Permalink
support for pelican-statistics added
Browse files Browse the repository at this point in the history
  • Loading branch information
arulrajnet committed Jan 13, 2025
1 parent 6bb3409 commit 6a6484f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
3 changes: 1 addition & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ folder name
* Navigation support
* Paralax cover images for posts, author archives and blog
* Author informations for posts and author archives
* Featured posts (via
https://github.com/getpelican/pelican-plugins/tree/master/neighbors[plugin])
* Featured posts (via https://github.com/pelican-plugins/neighbors[plugin])
* Reading progress for posts
* Automatic code syntax highlight
* Disqus support
Expand Down
17 changes: 9 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ classifiers = [
]

dependencies = [
"pelican == 4.10.2",
"pelican-image-process == 3.0.4",
"pelican-minify == 2.0.0",
"pelican-neighbors == 1.2.0",
"pelican-related-posts == 1.0.0",
"pelican-seo == 1.2.2",
"pelican-sitemap == 1.2.0",
"pelican-webassets == 2.1.0",
"pelican >= 4.10.2",
"pelican-image-process >= 3.0.4",
"pelican-minify >= 2.0.0",
"pelican-neighbors >= 1.2.0",
"pelican-related-posts >= 1.0.0",
"pelican-seo >= 1.2.2",
"pelican-sitemap >= 1.2.0",
"pelican-statistics >= 1.0.0",
"pelican-webassets >= 2.1.0",
]

[project.urls]
Expand Down
4 changes: 3 additions & 1 deletion templates/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ <h4 class="post-meta-author">
{% if article.modified and SHOW_ARTICLE_MODIFIED_TIME|default(False) %}
&bull; <time datetime="{{ article.locale_modified }}"> Updated on {{ article.locale_modified }}</time>
{% endif %}
{% if article.stats and 'read_mins' in article.stats %}
{% if article.statistics and 'read_mins' in article.statistics %}
&bull; {{ article.statistics['read_mins'] }} min read
{% elif article.stats and 'read_mins' in article.stats %}
&bull; {{ article.stats['read_mins'] }} min read
{% endif %}
</div>
Expand Down
16 changes: 7 additions & 9 deletions tests/default_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,13 @@

### Plugins

# PLUGIN_PATHS = [
# 'pelican-plugins'
# ]

# PLUGINS = [
# 'sitemap',
# 'neighbors',
# 'assets'
# ]
PLUGINS = [
"pelican.plugins.neighbors",
"pelican.plugins.related_posts",
"pelican.plugins.sitemap",
"pelican.plugins.statistics",
"pelican.plugins.webassets",
]

# Sitemap
SITEMAP = {
Expand Down

0 comments on commit 6a6484f

Please sign in to comment.