improve Readme

This commit is contained in:
Philipp Kunz 2016-11-14 13:33:16 +01:00
parent 759a1854b0
commit 9288ed3d2c

View File

@ -1,5 +1,5 @@
# smartfm # smartfm
smartfm handles frontmatter of files frontmatter done right
## Availabililty ## Availabililty
[![npm](https://push.rocks/assets/repo-button-npm.svg)](https://www.npmjs.com/package/smartfm) [![npm](https://push.rocks/assets/repo-button-npm.svg)](https://www.npmjs.com/package/smartfm)
@ -17,20 +17,26 @@ smartfm handles frontmatter of files
[![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/) [![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/) [![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
## Usage ## What is frontMatter?
say you have the following markdown file: say you have the following markdown file:
```markdown ```markdown
--- ---
title: A really awesome article title: A Really Awesome Article
date: 23-10-2020 date: 23-10-2020
type: feature type: feature
--- ---
# A Awesome Title # An Awesome Title
The world is cool. And here is why The world is cool. And here is why
* reason 1 * reason 1
* reason 2 * reason 2
``` ```
The top part that is enclosed by `---` denotes frontmatter, usually written in yaml notation.
Frontmatter is not exclusive to markdown.
It can be used as prefix in any type of file when preprocessed with smartfm.
## Usage
We recommend TypeScript for best in class Intellisense.
```javascript ```javascript
import * as smartfm from * smartfm import * as smartfm from * smartfm