I am using Jekyll and Github pages, testing locally using bundle exec jekyll serve. Everything else works fine so far.
My posts are in a /_posts folder off of the root, and are outputted correctly.
I cannot seem to get {% post_url %} working within posts for other internal posts, no matter what I do.
_posts folder, I have a post with a file name of 2011-04-14-free-million-dollar-idea-package-carriers-b2b-success.markdown
[root]/2011/04/free-million-dollar-idea-package-carriers-b2b-success/
permalink: /:year/:month/:title
I have tried the following references within {% post_url %} from another post, to try to link to the post:
Each one yields the error:
Could not parse name of post [reference] in tag 'post_url'
What am I missing?
If your post file name is 2011-04-14-free-million-dollar-idea-package-carriers-b2b-success.md or .markdown the syntax is :
[Link text]({% post_url 2011-04-14-free-million-dollar-idea-package-carriers-b2b-success %})
Also check that the front-matter date value matches the date in the post's file name.
(Some versions) of jekyll + safe_yaml can't find the post if the date on the file-name doesn't match the date in the front-matter data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With