Template::Plugin::xkcd - WWW::xkcd plugin for Template::Toolkit
# in your template [% USE xkcd %] <h1>xkcd comics!</h1> <p>Today's xkcd comic: [% xkcd.comic %]</p> <p>The 20th comic: [% xkcd.comic(20) %]</p>
A Template (Template::Toolkit) plugin to provide an image tag for xkcd comics. You can pick which comic (either latest, or by number).
It uses WWW::xkcd.
This method is used by Template.
If you want to use this plugin, simply add the following to your template:
[% USE xkcd %]
Fetches a comic.
Accept an optional argument for the number of a comic.
Returns an HTML <img> tag with the path and alternative text (alt text).
This gets the latest:
[% xkcd.comic %]
This gets the first:
[% xkcd.comic(1) %]
Just because. It's actually more useful than a lot of other stuff on CPAN. :)
Sawyer X <email@example.com>
This software is copyright (c) 2017 by Sawyer X.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.