如何使用 Pelican 为文章添加重定向?
How can I add a redirect to an article with Pelican?
我想要 header 中的一些东西,比如
title: Whatever
slug: whatever
redirect: bla
redirect: foo
redirect: bar
以便 Pelican 生成从 bla
和 foo
以及 bar
重定向到 whatever
的页面。这可能吗?
我刚刚看到这叫做"alias"。 pip install pelican-alias
可以安装插件pelican-alias
。然后 pelican_alias
必须放入 pelicanconf.py
中的 PLUGINS
列表。然后别名定义为
alias: bla, foo, bar
我想要 header 中的一些东西,比如
title: Whatever
slug: whatever
redirect: bla
redirect: foo
redirect: bar
以便 Pelican 生成从 bla
和 foo
以及 bar
重定向到 whatever
的页面。这可能吗?
我刚刚看到这叫做"alias"。 pip install pelican-alias
可以安装插件pelican-alias
。然后 pelican_alias
必须放入 pelicanconf.py
中的 PLUGINS
列表。然后别名定义为
alias: bla, foo, bar