GitPress Repo Plugin

GitPress Repo is a WordPress plugin that lets you easily embed a Github repo or Gist onto your WordPress site with a shortcode. This is great for other plugin or library authors that want to showcase the contents of a repo on their WordPress project pages.

GitPress Repo uses Darcy Clarkes Repo.js and Repo.js uses Markus EkwalljQuery Vangogh plugin for styling of file contents. Vangogh, subsequently, utilizes highlight.js, written by Ivan Sagalaev for syntax highlighting.

Examples of Usage:

Basic repo shortcode:

1
[repo name=”gitpress-repo” author=”bradthomas127″]

Repo shortcode with branch:

1
[repo name=”jquery” author=”jquery” branch=”strip_iife”]

jquery

  • name

Gist shortcode:

1
[gist id=”1595155″]
123456789101112131415161718192021222324252627282930313233343536
<?php
/**
* Plugin Name: Use AddQuicktag on my CPT
* Plugin URI: https://web-beta.archive.org/web/20140213215321/http://bueltge.de/
* Description: Add custom post type ‘my_custom_post_type’ to AddQuicktag plugin
* Author: Frank Bültge
* Version: 0.0.1
* Licence: GPLv3
* Author URI: https://web-beta.archive.org/web/20140213215321/http://bueltge.de
*/
// This file is not called from WordPress. We don’t like that.
if ( ! function_exists( ‘add_filter’ ) ) {
echo “Hi there! I’m just a part of plugin, not much I can do when called directly.”;
exit;
}
if ( ! function_exists( ‘my_addquicktag_post_types’ ) ) {
// add custom function to filter hook ‘addquicktag_post_types’
add_filter( ‘addquicktag_post_types’, ‘my_addquicktag_post_types’ );
/**
* Return array $post_types with custom post types strings
*
* @param $post_type Array
* @return $post_type Array
*/
function my_addquicktag_post_types( $post_types ) {
$post_types[] = ‘my_custom_post_type’;
return $post_types;
}
}
view rawgistfile1.aw hosted with ❤ by GitHub

Fork or Download from GitHub

3 Responses to GitPress Repo Plugin

  1. Great WordPress plugin .but i couldnt find it on WordPress official plugins.

  2. Mario says:

    Wow, thats a really good job. Thanks to all, really, this plugin save my life (in a way :P)