If I’m linking internally to another post or to another page should i be using link
for both or should I be using link
for pages and post_url
for posts? The documentation for linking implies the former when it says, “To link to a post, a page, collection item, or file, the link tag will generate the correct permalink URL” but later on implies the latter when it makes a special case for posts, “If you want like to include a link to a post on your site, the post_url tag will generate the correct permalink URL”. Looks like the docs just haven’t caught up to the code to me and that link
is the one tag to rule them all.
It’s up to you when you want to link to posts post_url
or link
will do the job.
If you prefer to use a generic tag, then link
is your friend.
But post_url
is not deprecated so it still has to be mentioned in the docs.
Feel free to open a PR if you think you can improve the current documentation. Thanks.