https://github.com/stubailo/meteor-markdown-templating
Make Meteor templates in .md files!
https://github.com/stubailo/meteor-markdown-templating
Last synced: 5 months ago
JSON representation
Make Meteor templates in .md files!
- Host: GitHub
- URL: https://github.com/stubailo/meteor-markdown-templating
- Owner: stubailo
- License: mit
- Created: 2014-09-12T21:24:26.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-05T11:53:47.000Z (almost 8 years ago)
- Last Synced: 2024-08-03T22:18:39.495Z (8 months ago)
- Language: CSS
- Homepage: https://atmospherejs.com/simple/markdown-templating
- Size: 39.1 KB
- Stars: 21
- Watchers: 5
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- jimsghstars - stubailo/meteor-markdown-templating - Make Meteor templates in .md files! (CSS)
README
markdown-templating
===================Make Meteor templates in .md files!

### How to use
`meteor add simple:markdown-templating`
Check out the [example app](https://github.com/stubailo/meteor-markdown-templating/tree/master/example), in particular [example.md](https://github.com/stubailo/meteor-markdown-templating/blob/master/example/example.md).
Make a markdown file inside your Meteor app. Inside your markdown, use `{{#template name='templateName'}}` to start a template, and `{{/template}}` to end it. For example:
```
{{#template name='markdownBody'}}# Welcome to Meteor!
There's another template included below.
{{> hello}}
{{/template}}
```Naturally, you can use helpers and include other templates inside your Markdown as well.
### Why would I use this if there's already the {{#markdown}} helper?
- You like to use an editor with live preview ([Mou](http://mouapp.com/)) to edit Markdown files, and it doesn't work with Markdown embedded in HTML.
- With this package, your markdown will be pre-compiled on the server when the app is built instead of compiled on the client every time the page is loaded.
- If you want to make a lot of templates that use Markdown, it's easier and more reasonable to keep them in .md files than .html files.
- Extending the Meteor templating system is fun.### How well tested is this package?
There are a few tests, but they are mostly sanity checks and don't go into testing all of the possible combinations of templates, markdown, and helpers.
Please report issues if you find them!
### Known issues/weirdness
1. No error handling - you'll just get a printout that says "parse error" in the console... if you're lucky.