The Affiliate Link Plugin for Grav CMS adds affiliation links to your pages
For example, it's being used on the bottom of this post on my blog.
It is recommended to install Affiliate Link directly through the Admin Plugin by browsing to the Plugins
tab and selecting Add
.
You can configure Affiliate Link via the Admin Plugin by browsing to Plugins
and selecting Affiliate Links
.
Global settings are configured at the plugin level as described above.
There is an additional configuration tab titled Affiliate Link
available on each page in the page editor. This is where to set page specific information like enabling the affiliation, and entering links from providers.
Currently, only Amazon and AliExpress provider are supported, patch welcome for other providers.
In your theme's twig, you'll need to had the following code where you want the affiliate links to appear:
{% if config.plugins['affiliate-links'].enabled and page.header().affiliation|length %}
{% include 'partials/affiliate-links.html.twig' %}
{% endif %}
Matt Mulhall for his Aura's plugin