惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Spread Privacy
Spread Privacy
L
LangChain Blog
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Google DeepMind News
Google DeepMind News
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
人人都是产品经理
人人都是产品经理
H
Hackread – Cybersecurity News, Data Breaches, AI and More
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Engineering at Meta
Engineering at Meta
P
Privacy International News Feed
I
Intezer
NISL@THU
NISL@THU
Jina AI
Jina AI
G
GRAHAM CLULEY
C
CERT Recently Published Vulnerability Notes
S
Schneier on Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Cisco Talos Blog
Cisco Talos Blog
Scott Helme
Scott Helme
MyScale Blog
MyScale Blog
IT之家
IT之家
Security Latest
Security Latest
C
Cisco Blogs
Cyberwarzone
Cyberwarzone
aimingoo的专栏
aimingoo的专栏
V
Vulnerabilities – Threatpost
L
LINUX DO - 热门话题
Recorded Future
Recorded Future
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
月光博客
月光博客
A
Arctic Wolf
云风的 BLOG
云风的 BLOG
N
Netflix TechBlog - Medium
K
Kaspersky official blog
S
Securelist
M
MIT News - Artificial intelligence
T
Threat Research - Cisco Blogs
P
Palo Alto Networks Blog
Simon Willison's Weblog
Simon Willison's Weblog
Know Your Adversary
Know Your Adversary
WordPress大学
WordPress大学
Project Zero
Project Zero
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
N
News and Events Feed by Topic
AWS News Blog
AWS News Blog
T
The Exploit Database - CXSecurity.com
T
The Blog of Author Tim Ferriss

Pelican – A Python Static Site Generator

Pelican 4.12 released Pelican 4.11 released Pelican 4.10 released Pelican 4.9 released New Pelican Site, Docs Theme, and Discussions Pelican 4.8 released Pelican 4.7 released Migrating Plugins to New Organization Pelican 4.5 released Pelican Sprint — Fall 2019 Pelican 4.1 released Pelican 4.0 released Pelican 3.7 released Pelican 3.6 released Pelican 3.5 released Pelican 3.4 released I18N Subsites plugin released Pelican 3.3 released Using Pelican with Heroku Pelican 3.2 released Pelican's Unified Codebase Pelican 3.1 released Pelican 3.0 released Pelican now has a blog of its own!
Pelican 4.6 released
Pelican Cont · 2021-03-23 · via Pelican – A Python Static Site Generator

Pelican 4.6 is now available. Thanks to Tom Adler’s contribution, this release contains a new feature that allows for more SEO-friendly index pages, whereby /page-1/ contains the oldest articles, with newer articles placed on /page-2/, /page-3/, etc. That way, the names of the previous article index pages do not change every time a new index page is generated. Cool URLs don’t change!

To enable this feature, first add a pagination pattern for -1 to your Pelican settings file. For example:

PAGINATION_PATTERNS = (
    (1, "{base_name}/page-1/", "{base_name}/page-1/index.html"),
    (2, "{base_name}/page-{number}/", "{base_name}/page-{number}/index.html"),
    (-1, "{base_name}/", "{base_name}/index.html"),
)

You will also benefit from changing other settings to match the intended behavior. For example:

DEFAULT_PAGINATION = 5
DEFAULT_ORPHANS = 4
ARTICLE_ORDER_BY = "date"
REVERSE_ARCHIVE_ORDER = True
NEWEST_FIRST_ARCHIVES = True

In your theme’s index.html and tag.html templates, change the object_list loop to object_list[::-1] to reverse the order of the article list:

{% for article in articles_page.object_list[::-1] %}

Make sure the pagination links below the list are changed to reflect the switched direction of “next” vs. “previous” articles. For example:

{% if articles_page.has_next() %}
    <a class="pagination-item newer" href="{{ SITEURL }}/{{ articles_next_page.url }}">next</a>
    {% else %}
    <span class="pagination-item newer">next</span>
{% endif %}
{% if articles_page.has_previous() %}
    <a class="pagination-item older" href="{{ SITEURL }}/{{ articles_previous_page.url }}">previous</a>
    {% else %}
    <span class="pagination-item older">previous</span>
{% endif %}

While this is general guidance and will apply differently depending on your chosen theme, hopefully the above helps you get further along experimenting with this new feature.

This new release also includes the following enhancements, fixes, and tweaks:

  • Speed up livereload Invoke task via caching (#2847)
  • Ignore None return value from get_generators signal (#2850)
  • Relax dependency minimum versions and remove upper bounds

For more info, please refer to the release page or the Release History section of the documentation. For the full list of changes, see: https://github.com/getpelican/pelican/compare/4.5.4...4.6.0

Upgrading from previous releases

Upgrading from Pelican 4.5.x should be smooth and require few (if any) changes to your environment. If upgrading from a previous release, review the other release announcements on this site to better understand what action might be necessary.

As always, we do everything we can to maximize backwards compatibility and ensure smooth Pelican upgrades. If you run into problems, please see the How to Get Help section of the documentation, and we will update this post with any upgrade tips contributed by the Pelican community.