AdSense patch for ikiwiki's embed pluging
Today I've started playing with AdSense, mainly to check whether a typical homepage+blog web site (read: mine) can survive its hosting costs by the means of this kind of revenue or not.
However I don't want the ads to be visible on all pages, but only in some of them, mainly the main blog page (which scores high in search engine results and is also not prone to the risk of bothering usual readers, thanks to---$DEITY bless them---RSS/Atom feeds) and some selected pet software project homepages. With ikiwiki implementing this appeared trickier than I expected. The main difficulty is of course the wiki-wide htmlscrubber plugin which I do not want to switch off because of discussion pages and a part of my website which is actually used as a world-editable wiki.
Googling around it seems that there is an
adsense.pm
plugin for ikiwiki, but it is not
registered in the ikiwiki plugins page; as such I was not
particularly envy to try it out. Besides, the right place to add
such a feature to me seems the embed plugin.
... so I've minimally patched it: see Debian bug #462970. If you're
willing to use AdSense with ikiwiki please try out the patch: since
I'm an AdSense newbie it might well be I've underestimated the
possible script
snippets it can generate. Post
comments to Debian bug
#462970.