How do you link to a post (collection item)? #593
Answered
by
nathangross
nathangross
asked this question in
Q&A
-
From say an index view that shows a collection of posts, what is the proper way to link to each post? Something like
|
Beta Was this translation helpful? Give feedback.
Answered by
nathangross
Nov 11, 2021
Replies: 1 comment 1 reply
-
Looks like it should be |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
nathangross
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like it should be
$post->getUrl()
. I had tried that but it looks like if you don't have a layout set in your front matter (i.e.extends: _layouts.main
), that will result in blank or null.