Skip to content

Instantly share code, notes, and snippets.

View azharc's full-sized avatar

Azhar Chougle azharc

View GitHub Profile
@azharc
azharc / kirbytext.extended.php
Created April 2, 2014 16:37
Instapaper Feed for KirbyText
<?php
/*
AUTHOR:
Azhar Chougle (azmataz.com)
DESCRIPTION:
This KirbyText extension will fetch your Instapaper Likes, choose a random one, and output a link.
It won't output if the feed is invalid, and will try to read it from cache if it is unavailable.
<?php
// create srcset images for kirby
function img($image, $options = array()) {
// defaults
$defaults = array(
"alt" => $image->title()->or(''),
"widths" => [100, 100, 100],
"class" => "",
"lazy" => false,
);