octalmage / github-readme Goto Github PK
View Code? Open in Web Editor NEWEmbed readme files in pages/posts.
Home Page: http://wordpress.org/plugins/github-readme/
Embed readme files in pages/posts.
Home Page: http://wordpress.org/plugins/github-readme/
=== Github README === Contributors: octalmage, olensmar, ianmjones, nlenkowski Donate link: http://jason.stallin.gs Tags: github, embed, shortcode, readme, markdown Requires at least: 3.0.1 Tested up to: 4.5.2 Stable tag: trunk License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Easily embed GitHub READMEs in pages/posts. == Description == Github README is a plugin that allows you to embed markdown from GitHub in a page or post using a simple shortcode. Usage: **github_readme** This shortcode embeds the project's readme. [github_readme repo="octalmage/Marknote"] You can also trim lines from the top of the readme using the "trim" option: [github_readme repo="octalmage/Marknote" trim="3"] This is useful for removing titles since your page/post will most likely already have one. **github_markdown** This shortcode embeds any markdown file found in the repository. [github_markdown repo="octalmage/Marknote" file="README.md"] trim, branch, and cache (seconds to cache) also supported. **github_wikipage** This shortcode embeds pages from a project's wiki. [github_wikipage repo="octalmage/Marknote" page="Syntax"] trim and cache also supported. == Screenshots == 1. Example of the plugin in action on my blog: http://jason.stallin.gs/projects/marknote/ == Changelog == = 0.2.0 = * Improved markdown rendering with MarkdownExtra. Special thanks to nlenkowski! = 0.1.1 = * Add "cache" attribute to the github_readme shortcode. * Add "branch" attribute to the github_readme shortcode. * Add the ability to use the `shortcode_atts_{$shortcode}` filter. * Fix transients so they are properly referenced when attributes are changed. Special thanks to ianmjones! = 0.1.0 = * Added new github_markdown and github_wikipage shortcodes (thanks olensmar!). = 0.0.3 = * Fixed plugin name. = 0.0.2 = * Fixed plugin header. = 0.0.1 = * First Version. Stable so far!
First of all, thanks for this plugin!
We are using it on our Website to show a compatibility list of devices (openhmd.net) that we maintain on the Wiki.
One request I would have though is if it would be possible to add a option for table sorting, since that would be a great addition using this on websites.
Thanks
After updating to WP 4.6.3, the github_readme_get_url function fails with the old: "Cannot use object of type WP_Error as array" error (line 169).
This is easily fixed by using the following code instead of the current response code checking:
if ( is_array( $response ) && ! is_wp_error( $response ) ) {
$data = $response['body']; // use the content
}
Would it be possible to access private repositories via a token ?
No cache during development.
I am not a Wordpress developer, but I attempted to add a README into a wordpress blog. I am using WordPress 4.9.5
and it seems like this plugin doesn't work. Any ideas what I can try or debug it?
Error message in my debug.log:
[14-Apr-2018 15:39:06 UTC] PHP Notice: Trying to get property of non-object in /github-readme/github-readme.php on line 59
By enabling the shortcode_atts_{$shortcode}
filter different defaults for the attributes can be added site wide.
It would be good to add a branch attribute to the github_readme
short code that works in the same way as the branch attribute does for the github_markdown
shortcode.
It would be good to add a cache attribute to the github_readme
short code that works in the same way as the cache attribute does for the github_markdown
and github_wikipage
shortcodes.
At present if the cache or branch attributes are changed the old transient is still used until it expires.
Also, depending on the names of repos or files the transient's name is truncated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.