[![NPM version][npm-image]][npm-url] [![Standard - JavaScript Style Guide][standardjs-image]][standardjs-url]
npm install markdown-it-calendar> Plugin for using markdown syntax to make a beautiful calendar for markdown-it markdown parser.
#### in script #### in markdown 2. Write your day-schedule #### Basic syntax - 23 #### Travel, Todo calendar - 2 Day2 - 3 Day3 - 3 ## Publish - 10 Update!! Options [standardjs-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg [standardjs-url]: https://standardjs.com
With this plugin you can create a calendar using markdown like:
```
:::calendar 2017 4
Write your to-do-things.
:::`
#### Prerequire
- npm (we assume you have pre-installed node.js).
- markdown-itInstallation
bash`
npm install markdown-it-calendar --save`Use
javascript`
const md = require('markdown-it')
md.use(require('markdown-it-calendar'))`
1. Set Year, Month (ex: 2017 04), then it will render the correct calendar.`
:::calendar year month
:::-
- Using , +, * be a marker, just like writting ul (no-sequence list).[
- Using ,] add EventTitle, then you can add Description after one space ' ' of eventTitle.`
- If the day has a big event or important meanings, you can add DayTitle after Date.`
:::calendar Year Month
- Date DayTitle
- [EventTitle1] Description1
- [EventTitle2] Description2
:::`
##### **Support original markdown syntax in calendar.Syntax Example
`
:::calendar 2017 4
- 1 today is good
- [Title1] Description1
- [Title2] Description2
- [Title3] Description4
:::``
:::calendar 2017 4
- 1 Day1
- [checking] 8:00 at Taipei Taoyuan airport
- [arrive] 5-stars hotel.
- [shopping] NO BUDGET!!!
- [dinner] NO on a diet!!!
- [Back] I love home~
:::`
#### Support original markdown syntax.`
:::calendar 2017 4
- [markdown-it-calendar] That's a amazing tool from markdown-it.
- [v1.5.0] OMG!
- Add style dark.
- Fix markdown original syntax bug.
:::`Config
Configs can be set directly in your markdown parser as per above examples, like this:javascript`
const md = require('markdown-it')
md.use(require('markdown-it-calendar'), {
startMarker: "any marker you want"
}):::calendar
- startMarker (default = ):::
- endMarker (default = ) Year Month
- PARAMS_REGEX (set regex for , default = /^(\((.)\)){0,1}\s+(\d+)[ ]+(\d+)\s$/)- Date DayTitle
- DATE_REGEX (set regex for , default = /^[+-]\s+(\d{1,2})(\s(.))?$/)- [EventTitle1] Description1
- EVENT_REGEX (set regex for , default = /^[-+]\s\[(.?)\]\s(.*)$/`)License
© MIT

[npm-image]: https://badge.fury.io/js/markdown-it-calendar.svg
[npm-url]: https://www.npmjs.com/package/markdown-it-calendar