mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Add a BlackFriday option for rel="noreferrer" on external links
Add a configuration option "noreferrerLinks". When set to "true" the "HTML_NOREFERRER_LINKS" flag is being passed to Blackfriday. Thereby all *absolute* links will get a "noreferrer" value for their "rel" attribute. See #4722
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
2174525cec
commit
20cbc2c785
@@ -48,6 +48,11 @@
|
||||
Blackfriday flag: **`HTML_NOFOLLOW_LINKS`** <br>
|
||||
Purpose: `true` creates <s>external links</s> **absolute** links with `nofollow` being added to their `rel` attribute. Thereby crawlers are advised to not follow the link. While the `rel="nofollow"` attribute is typically used for external links, Blackfriday does that for _all_ absolute links. One needs to make note of this if they use absolute links throughout, for internal links too (for example, by setting `canonifyURLs` to `true` or via `absURL`).
|
||||
|
||||
`noreferrerLinks`
|
||||
: default: **`false`** <br>
|
||||
Blackfriday flag: **`HTML_NOREFERRER_LINKS`** <br>
|
||||
Purpose: `true` creates <s>external links</s> **absolute** links with `noreferrer` being added to their `rel` attribute. Thus when following the link no referrer information will be leaked. While the `rel="noreferrer"` attribute is typically used for external links, Blackfriday does that for _all_ absolute links. One needs to make note of this if they use absolute links throughout, for internal links too (for example, by setting `canonifyURLs` to `true` or via `absURL`).
|
||||
|
||||
`plainIDAnchors`
|
||||
: default **`true`** <br>
|
||||
Blackfriday flag: **`FootnoteAnchorPrefix` and `HeaderIDSuffix`** <br>
|
||||
|
Reference in New Issue
Block a user