Link Effects

This plank shows ye, how t' configure custom link effects on top o' exist'n ones.

This sett'n can also be overridden by yer front matter.

If ye don’t configure anyth'n 'n yer hugo.toml, th' link effects default t'

Default Values

[linkEffects]
  download = false
  target = false
linkEffects:
  download: false
  target: false
{
   "linkEffects": {
      "download": false,
      "target": false
   }
}

Configurat'n

Opt'n Ye can change these sett'ns 'n yer hugo.toml an' add arbitrary custom effects as boolean values (like bg-white 'n th' below snippet).

hugo.
[params]
  [params.linkEffects]
    bg-white = true
    target = '_blank'
params:
  linkEffects:
    bg-white: true
    target: _blank
{
   "params": {
      "linkEffects": {
         "bg-white": true,
         "target": "_blank"
      }
   }
}

This would result 'n

[linkEffects]
  bg-white = true
  download = false
  target = '_blank'
linkEffects:
  bg-white: true
  download: false
  target: _blank
{
   "linkEffects": {
      "bg-white": true,
      "download": false,
      "target": "_blank"
   }
}

Example

Wit' this configurat'n 'n effect, th' follow'n URL

[Magic 'n new window](images/magic.gif)

would result 'n

<a href="/images/magic.gif?target=_blank" target="_blank" class="bg-white">Magic 'n new window</a>

Styl'n Effects

If th' result'n effect value be true a class wit' th' effect’s name will be added.

Styles fer default effects be contained 'n th' theme. Add styles fer yer custom effects t' layouts/partials/content-header.html.

For th' above custom effect ye could add th' follow'n style:

<style>
a.bg-white {
  background-color: white;
}
</style>