How to link your own articles on a Pelican blog?

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)

... or ...

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

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


The way I do this is by specifying my own sluglines using the save_as metadata tag. So if I have a blog post called my_post.md, it'll look like this:

Title: My Blog Post
save_as: myblogpost.html

This is the world's most boring blog post.

That ensures I can link to it at /myblogpost.html. Then in some other blog post, I can say:

Title: My Second Blog Post
save_as: mysecondblogpost.html

This is the world's second most boring blog post. The most boring blog post is [here]({{ SITEURL }}/myblogpost.html).

It's a more flexible and elegant solution that gives you finer-grained control. And if you're not using Pelican for a blog site, it's pretty essential.