如何在Pelican博客上链接自己的文章? [英] How to link your own articles on a Pelican blog?

查看:165
本文介绍了如何在Pelican博客上链接自己的文章?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试链接html文件名,但是它可以工作,因为它们位于同一文件夹中.

I tried to link with the html file name, but it works because they are on the same folder.

[Title](./this-is-the-file.html)

但是由于ARTICLE_URL模式,其他文章可能会出现在另一个文件夹中.例子:

But it is possible that another article would appear on another folder because of the ARTICLE_URL pattern. Examples:

[Title 1](/2014/02/article1.html)
[Title 2](/2014/01/25/article2.html)

是否可以将自己的文章与对子词的引用链接起来?还有什么比生成的HTML文件名更好的解决方案?

Is it possible to link your own articles with a reference to the slug ? Any other better solution than the generated HTML file name ?

推荐答案

文档,则可以通过以下方式链接到其他源内容文件:

As noted in the documentation, you can link to other source content files via:

[a link relative to content root]({filename}/this-is-the-source-file.md)

...或...

[a link relative to current file]({filename}../this-is-the-source-file.md)

Pelican将采用您选择的URL方案,并自动确定链接到另一篇文章的正确方法.

Pelican will incorporate your chosen URL scheme and automatically determine the proper way to link to the other article.

这篇关于如何在Pelican博客上链接自己的文章?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆