An open API service indexing awesome lists of open source software.

https://github.com/james2doyle/pyro-github-markdown

Github flavoured markdown field type for PyroCMS
https://github.com/james2doyle/pyro-github-markdown

Last synced: about 1 year ago
JSON representation

Github flavoured markdown field type for PyroCMS

Awesome Lists containing this project

README

          

pyro-github-markdown
====================

Github flavoured markdown field type for PyroCMS.

Most of the work for this repo is taken from [GitHub-Flavored Markdown Comments](https://github.com/evansolomon/wp-github-flavored-markdown-comments) plugin for Wordpress. That repository is also based on [Michel Fortin's PHP markdown library](https://github.com/michelf/php-markdown/) with added features from [GitHub-flavored Markdown](https://github.com/github/github-flavored-markdown).

*All I did was just bring it all together and make it play nice with Pyro.*

![write your markdown](https://raw.github.com/james2doyle/pyro-github-markdown/master/write.png)

![preview your markdown](https://raw.github.com/james2doyle/pyro-github-markdown/master/preview.png)

### Usage

* Install the field type as normal.
* Add the field type to a page type or stream
* Enter in your sexy Github Markdown
* Just use `{{ the_field_slug }}` to render the HTML

### Examples

Input:

```markdown
GitHub-Flavored Markdown Comments
=============================

Based on [Michel Fortin's PHP markdown library](https://github.com/michelf/php-markdown/) with added features from [GitHub-flavored Markdown](https://github.com/github/github-flavored-markdown).

* Single linebreaks are treated as new paragraphs
* Code "fencing" with three backticks (```)

### Heading 3

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

\`\`\`css
.container {
background: red;
}
\`\`\`

**so much fun!!**
```

Output:

```html

GitHub-Flavored Markdown Comments

Based on Michel Fortin's PHP markdown library with added features from GitHub-flavored Markdown.


  • Single linebreaks are treated as new paragraphs

  • Code "fencing" with three backticks (```)

Heading 3

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

.container {

background: red;
}

so much fun!!


```

### More Info!

If you need to know more about the caveats of this plugin, please [see the README](https://github.com/evansolomon/wp-github-flavored-markdown-comments/blob/master/README.md) for the original lib.