(link: …)
Creates a link
Attributes
In addition to the main link, option, the tag supports the following attributes:
class
lang
rel
role
target
title
text
| Attribute | Description | Default |
|---|---|---|
| class | The class which is added to link element | null |
| lang | The language for link to a page in another language (only on multi-language sites) | null |
| rel | The rel attribute that is added to link element | null |
| role | The role attribute that is added to link element | null |
| target | The target attribute that is added to link element | null |
| title | The title attribute that is added to link element | null |
| text | The text that is added to link element | null |
Attribute defaults from config
You can customize the defaults of this tag's attributes via the kirbytext.link config option.
Examples
Link with link text
(link: http://wikipedia.org text: Wikipedia)
Relative link
(link: some/page text: Link to some internal page)
Link to page in a specific language
(link: some/page lang: de)
Link to an anchor
(link: #some-section text: Link to some section on the same page)
Specifying the target for the link
(link: http://wikipedia.org text: Wikipedia target: _blank)
Link with a title attribute
(link: http://wikipedia.org text: Wikipedia title: Go to Wikipedia)
Link with a rel attribute
(link: http://yourdomain.com text: My website rel: me)
Link with a custom CSS class
(link: http://wikipedia.org text: Wikipedia class: mylink)
Link to a page in another language (only on multi-language sites)
(link: some/page text: Some page in German lang: de)
Link with a role attribute
(link: delete-account text: Delete my account role: button)