bobbingwide / oik-bob-bing-wide

More lazy smart shortcodes
https://www.oik-plugins.com/oik-plugins/oik-bob-bing-wide-more-lazy-smart-shortcodes/
GNU General Public License v2.0
2 stars 0 forks source link

Add support for type parameter being GitHub repository file name #11

Open bobbingwide opened 8 years ago

bobbingwide commented 8 years ago

I've been looking at a number of GitHub repositories which are for Genesis child themes and decided I wanted an easy way to display links to the repositories using their screenshots. It makes sense to extend the [github] shortcode to display the image when the type parameter is a file name which is an image (e.g. .jpg, .png)

The image displayed would have an URL like this https://raw.githubusercontent.com/bobbingwide/oik-bob-bing-wide/master/assets/oik-bob-bing-wide-banner-772x250.jpg

Shortcode example: [github bobbingwide oik-bob-bing-wide assets/oik-bob-bing-wide-banner-772x250.jpg]

While we're at it, we may as well support other files. Shortcode example: [github bobbingwide oik-bob-bing-wide shortcodes/oik-github.php]

https://github.com/bobbingwide/oik-bob-bing-wide/blob/master/shortcodes/oik-github.php

We won't default the file name. So a link to a theme by its screenshot.png file would be [github bobbingwide genesis-oik screenshot.png]