Various ways to post links to other posts in the same blog, and external links too.
Link to another post by its file name
This is a local editor friendly way, just link straight to the Markdown file.
The link must start at the project root, and end in .md
.
[Link using Markdown path](/posts/customary-lorem-ipsum.md)
Produces:
You can also link to an anchor in the target file.
[Link using Markdown path and heading anchor](/posts/customary-lorem-ipsum.md#tincidunt-arcu-non-sodales)
Produces:
Link using Markdown path and heading anchor
Links inside notice
and figure
{% notice "warning" %}
You can also link inside shortcodes such as `notice` and `figure`, [pointing at the file](/posts/customary-lorem-ipsum.md).
You can also link to a heading anchor in the file [like this](/posts/customary-lorem-ipsum.md#tincidunt-arcu-non-sodales).
{% endnotice %}
Produces:
You can also link inside shortcodes such as
You can also link to a heading anchor in the file like this.
notice
and figure
, pointing at the file.You can also link to a heading anchor in the file like this.
Link to another post by URL
You can also link to the output URL of the post. The blog’s pathPrefix
gets added on automatically. Remember to include the trailing slash.
[Link using root-relative URL](/customary-lorem-ipsum/)
Produces:
External links
[External link](https://example.com)
Produces:
Link with a title
[Link with a title](https://example.com "title text!")
Produces:
Buttons
It’s also possible to use a button as a link.
{% button "Button with a link", "/" %}
Produces: