Skip to content

X-Ryl669/grav-affiliate-links

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

Affiliate Link Plugin

The Affiliate Link Plugin for Grav CMS adds affiliation links to your pages

Demo

For example, it's being used on the bottom of this post on my blog.

Features

  • Minimal configuration required to automatically inject affiliate links in your pages in a consistent manner.

Installation

Admin Plugin

It is recommended to install Affiliate Link directly through the Admin Plugin by browsing to the Plugins tab and selecting Add.

Configuration

You can configure Affiliate Link via the Admin Plugin by browsing to Plugins and selecting Affiliate Links.

Usage

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.

Installation in your theme

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 %}

Credits

Matt Mulhall for his Aura's plugin

About

An affiliate links plugin for Grav CMS

Resources

License

Stars

Watchers

Forks

Packages

No packages published