• Stars
    star
    118
  • Rank 299,923 (Top 6 %)
  • Language
    PHP
  • License
    MIT License
  • Created almost 12 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

WordPress Plugin for PHP-Markdown and GitHub Flavored Markdown

GitHub Flavored Markdown for WordPress

wp-gfm is the WordPress plugin that convert from GitHub Flavored Markdown by using the PHP-Markdown or GitHub Render API.

Dependencies

How to work

The plugin has two conversions.

[markdown] as shortcode for PHP-Markdown, convert by using \Michelf\Markdown class inside WordPress.

[gfm] as shortcode for GitHub Flavored Markdown, convert by using the Render API outside WordPress. Default Render API is GitHub Render API, limits requests to 60 per hour for unauthenticated requests. Alternatives Render API that works on heroku is here: https://github.com/makotokw/ruby-markdown-render-api

Installation

Download from https://github.com/makotokw/wp-gfm/releases and upload to /path/to/wp-content/plugins/wp-gfm

PHP-Markdown (Recommended)

This conversion depends on PHP Markdown Lib 1.7.0.

Usage

Use [markdown][/markdown] as shortcode on entry.

Example:

[markdown]
| First Header  | Second Header |
| ------------- | ------------- |
| Content Cell  | Content Cell  |
| Content Cell  | Content Cell  |
[/markdown]

Fenced code blocks

Example:

[markdown]
```ruby
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
```
[/markdown]

Table of content

left aligned toc.

[TOC]

right aligned toc.

[>TOC]

Example:

[markdown]
# headLineOne

## something

[TOC]

## something more
[/markdown]

Embed content

Supported embed markdown file by [embed_markdown] shortcode.

[embed_markdown url="https://raw.githubusercontent.com/makotokw/wp-gfm/master/README.md"]

Option

Admin > Settings > WP GFM

  • AutoLink (default: no)
  • Code block template
  • (default: <pre class="prettyprint lang-{{lang}}" title="{{title}}">{{codeblock}}</pre> )
<pre class="prettyprint lang-ruby">require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
</pre>

You can use google-code-prettify if you want to allow syntax highlighting.

GitHub Render API

This way is not good. If there are 5 shortcodes in page, the plugin require 5 HTTP requests.

Setup

  • Open WP GFM Settings and set Render URL

Usage

Use [gfm][/gfm] as shortcode on entry.

[gfm]
```ruby
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
```
[/gfm]

Result

Result

Development

npm install
grunt debug

LICENSE

The MIT License

Current Version

The line below is used for the updater API, please leave it untouched unless bumping the version up :)

Current Version:0.11

More Repositories

1

redmine-theme-gitmike

This is github-like theme for Redmine.
SCSS
359
star
2

php-twient

php-twient is a php twitter client library. require PHP5.3+, supports OAuth and should work without curl.
PHP
26
star
3

jquery.ui.potato.menu

Simple Drop Down Menu for jQuery
JavaScript
21
star
4

php-hadoopstreaming

php utils for Hadoop Streaming
PHP
17
star
5

CocoaWZYFlatUIColor

Flat UI Colors and iOS7 Colors for iOS UIColor
Objective-C
16
star
6

AndroidWZCircularListView

The Circular ListView for Android
Java
15
star
7

redmine_render_markdown_in_repository

Redmine Render Markdown in Repository
Ruby
11
star
8

wp-amazonjs

WordPress Amazon Plugin, http://wordpress.org/plugins/amazonjs/
PHP
11
star
9

wp-theme-makotokw

WordPress theme for kwLog
PHP
6
star
10

IRCapture

The developer tools for IRKit
Objective-C
6
star
11

pebble-irkit-remote

IRKit Remote as Pebble Watchapp
JavaScript
5
star
12

jquery.silverlight

Creates Silverlight object by jQuery
JavaScript
4
star
13

CocoaWZYCircularTableView

The Circular UITableView for iOS
Objective-C
4
star
14

world-clocks

Displays multiple world clocks for Chrome Extension
JavaScript
3
star
15

pukiwiki.codeprettify

PukiWiki Plugin, Syntax highlighting by using google-code-prettify
PHP
3
star
16

SocialSpringGraph

JavaScript
2
star
17

crx-tokyo-ame

Tokyo Amesh Chrome App
JavaScript
2
star
18

puppet-kobito

Kobito Puppet Module for Boxen
Ruby
2
star
19

CocoaWZYGarapon

GaraponTV API wrapper for iOS
Objective-C
2
star
20

cookbook-predictionio

Chef Cookbook for PredictionIO
Ruby
1
star
21

pebble-mineclock

The minecraft clock as Pebble watchface for Pebble Time
C
1
star
22

CocoaWZYDevice

Instead of UIDevice. uniqueIdentifier for iOS5+
Objective-C
1
star
23

php-twientbot

PHP Twitter bot for heroku
PHP
1
star
24

ruby-markdown-render-api

Ruby
1
star
25

GaranchuForiOS

Garapon TV iOS Application
Objective-C
1
star
26

SilverlightMediaFramework

forked SilverlightMediaFramework
C#
1
star
27

php-youtube

PHP
1
star
28

CocoaWZYAVPlayer

Objective-C
1
star
29

Wheezy.Pivot.NET

C# class library to create pivot collection file with DeepZoom collection for Pivot by Microsoft Live Labs
C#
1
star
30

php-garapon

PHP LIbrary for Garapon TV API
PHP
1
star
31

redmine_makotokw_mypage_blocks

makoto_kw's Mypage blocks for Redmine
HTML
1
star
32

wp-import-mt-patch

Movable Type to WordPress patch
PHP
1
star