parsiya / Hugo-Shortcodes

Parsia's Hugo Shortcodes
MIT License
106 stars 14 forks source link

Create a shortcode for relref #13

Closed parsiya closed 3 years ago

parsiya commented 3 years ago

This is how my relref snippet does:

[link text]({{< relref "/post/2020/2020-01-01-blog/index.markdown#anchor" >}} "link text")

However, this is bulky and make blog posts unreadable.

Make a shortcode that does it a bit better. I have not decided on the parameters yet but here's an example:

{{< myref title="link text" post="/2020/2020-01-01-blog" anchor="anchor" >}} should generate the above.

Or I can do positional parameters {{< myref "link text" "/2020/2020-01-01-blog" "anchor" >}}

parsiya commented 3 years ago

Fixed in 31d431437961d917713692e9894b512207eb5f7f, closing.