Let's say I have a specific post:
posts/8-1-2020/index.html
It has a slug:
my-post.
I want to link to this directly from another article. How can I retrieve the URL with Hugo?
Let's say I have a specific post:
posts/8-1-2020/index.html
It has a slug:
my-post.
I want to link to this directly from another article. How can I retrieve the URL with Hugo?
That should be what the shortcode ref is for:
{{< ref "/posts/8-1-2020/my-post" >}}
You will get an error if your document could not be uniquely resolved