Skip to content
This repository

Markdown rendering for DocPad, using Robotskirt (Sundown)

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .npmignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 CONTRIBUTING.md
Octocat-spinner-32 Cakefile
Octocat-spinner-32 HISTORY.md
Octocat-spinner-32 LICENSE.md
Octocat-spinner-32 README.md
Octocat-spinner-32 package.json
README.md

Robotskirt Plugin for DocPad

Build Status NPM version Dependency Status Development Dependency Status
Gittip donate button Flattr donate button PayPayl donate button BitCoin donate button Wishlist browse button

Markdown rendering for DocPad, using Robotskirt

Convention: .html.md|markdown

Install

docpad install robotskirt

Configure

For information on customising your plugin configuration you can refer to the DocPad FAQ

Robotskirt Options

You can customise the Robotskirt options using the robotskirtOptions object. By default we use:

plugins:
    robotskirt:
        robotskirtOptions:
            EXT_AUTOLINK: true
            EXT_FENCED_CODE: true
            EXT_LAX_SPACING: true
            EXT_NO_INTRA_EMPHASIS: true
            EXT_SPACE_HEADERS: true
            EXT_STRIKETHROUGH: true
            EXT_SUPERSCRIPT: true
            EXT_TABLES: true
            HTML_SKIP_HTML: false
            HTML_SKIP_STYLE: false
            HTML_SKIP_IMAGES: false
            HTML_SKIP_LINKS: false
            HTML_EXPAND_TABS: false
            HTML_SAFELINK: false
            HTML_TOC: false
            HTML_HARD_WRAP: false
            HTML_USE_XHTML: true
            HTML_ESCAPE: false

SmartyPants

It makes "smart" punctuation. See more on its homepage. Default is true:

plugins:
    robotskirt:
        smartypants: true

Hightlight

It supports highlighting code blocks at build time. Following is using highlight.js.

plugins:
    robotskirt:
        highlight: (code, lang)->
            has = lang && hl.LANGUAGES.hasOwnProperty(lang.trim())

            open = if has then '<pre><code class="lang-'+lang.trim()+'">' else '<pre><code>'
            body = if has then hl.highlight(lang, code).value else hl.highlightAuto(code).value
            close = '</code></pre>'

            return open + body + close

Inline

You can add your markup in only normal text blocks. Next example is Twitter tag exmaple. @pismute will be rendered <a href="https://twitter.com/pismute">@pismute</a>:

plugins:
    robotskirt:
        inline: (src, hash)->
            out = src

            #for people
            out = out.replace /(^|[ \t]+)@([a-zA-Z0-9]+)/g, (whole, m1, m2) ->
                hash m1 + '<a href="https://twitter.com/' + m2 + '">@' + m2 + '</a>'

            #for hash tag·
            out = out.replace /(^|[ \t]+)#([ㄱ-ㅎ가-힣a-zA-Z0-9]+)/g, (whole, m1, m2) ->
                hash m1 + '<a href="https://twitter.com/search?q=%23' + escapeURL(m2) + '&src=hash">#' + m2 + '</a>'

            return out

History

Discover the change history by heading on over to the HISTORY.md file.

Contribute

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

Backers

Maintainers

These amazing people are maintaining this project:

Sponsors

No sponsors yet! Will you be the first?

Gittip donate button Flattr donate button PayPayl donate button BitCoin donate button Wishlist browse button

Contributors

These amazing people have contributed code to this project:

Become a contributor!

License

Licensed under the incredibly permissive MIT license

Copyright © 2012+ Bevry Pty Ltd us@bevry.me (http://bevry.me)

Something went wrong with that request. Please try again.