Octopress的插件

记得去掉{和%之间的空格

包含代码(Include Code)

语法
1
{ % include_code [title] [lang:language] path/to/file % }
例子
1
{ % include_code test.js % }
(test.js) download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/**
sample javascript from xui
*/

var undefined,
    xui,
    window     = this,
    string     = new String('string'),
    document   = window.document,
    simpleExpr = /^#?([\w-]+)$/,
    idExpr     = /^#/,
    tagExpr    = /<([\w:]+)/,
    slice      = function (e) { return [].slice.call(e, 0); };
    try { var a = slice(document.documentElement.childNodes)[0].nodeType; }
    catch(e){ slice = function (e) { var ret=[]; for (var i=0; e[i]; i++)
        ret.push(e[i]); return ret; }; }

window.x$ = window.xui = xui = function(q, context) {
    return new xui.fn.find(q, context);
};

引用块(Blockquote)

语法
{ % blockquote [author[, source]] [link] [source_link_title] % }
Quote string
{ % endblockquote % }
例子
{ % blockquote % }
Last night I lay in bed looking up at the stars in the sky and I thought to myself, where the heck is the ceiling.
{ % endblockquote % }

Last night I lay in bed looking up at the stars in the sky and I thought to myself, where the heck is the ceiling.

{ % blockquote Douglas Adams, The Hichhikers Guide to the Galaxy % }
Flying is learning how to throw yourself at the ground and miss.
{ % endblockquote % }

Flying is learning how to throw yourself at the ground and miss.

Douglas Adams The Hichhikers Guide to the Galaxy
{ % blockquote Seth Godin http://sethgodin.typepad.com/seths_blog/2009/07/welcome-to-island-marketing.html Welcome to Island Marketing % }
Every interaction is both precious and an opportunity to delight.
{ % endblockquote % }

Every interaction is both precious and an opportunity to delight.