Here is a new plugin to manage Google Adsense with Grav CMS...

Muuvmuuv has made a first version of Adsense plugin for Grav. This version doesn't fill my needs, I have fully modified to remake one more flexible to my needs.

And I do a little presentation! :)

The operation

This version allow you:

  • To integrate Ad blocs inside page content.

The plugin shortcode is used. To make easy integration, you can to define the id of the listed Ads in the section page_ads of plugin configuration.

A simple {% include ""; %} is sufficient. There are 3 templates (horizontal, vertical and square) used to integrate easily the Ad blocs defined in the section modular_ads of plugin configuration.

Demo

Using shortcode:

Code

Sample 1

Render

Code

Sample 2

Render

Using Modular Integration:

Code

{% include 'partials/adsense-square.html.twig' %}

Rendu

See top right of the site page. ;)

Hoping that this plugin will be useful for you... :)

You can comment, give me your suggestions or even better contribute.

See you in the next article. xD

Previous Post Next Post


Add a comment