Adding rel=sponsored to buttons in action buttons from YAML front matter #3976
Unanswered
mkruisbrink
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there,
I've been Googling for quite a long time on how to add a rel="sponsored" elements to external links in action buttons generated in the YAML front matter but I can't find any resources related to this. How can I add any
rel=""
element to the button I generate with the YAML front matter as per below??The only way I think this is possible is to modify the
_includes
forpage__hero.html
as per below. However, I reckon I don't wanna mess with the theme files and I'm better off creating my own copy of the includes where I add thisrel=""
element to the actions and use it when required. How do I achieve this?For external sponsored links generated inside inline content I can achieve this easily as I've been doing it like this:
For buttons it is the same but I just add a button helper class
{: .btn .btn--success}
to the inline text.Any pointer in the right direction/best practice for the button on the hero image is very much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions