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
- Host: GitHub
- URL: https://github.com/james2doyle/pyro-github-markdown
- Owner: james2doyle
- Created: 2013-06-23T03:40:07.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2014-06-11T12:52:32.000Z (about 12 years ago)
- Last Synced: 2025-04-02T22:32:40.275Z (about 1 year ago)
- Language: PHP
- Size: 233 KB
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.*


### 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.