2.0.0 • Published 6 years ago

pbox v2.0.0

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
6 years ago

pbox

Parser for concatenated Jekyll posts

Install

npm install pbox

Usage

var fs = require('fs')
var pbox = require('pbox')

var posts = fs.readFileSync('concat.md', 'utf-8')
var parsed = pbox.parse(posts)

Given the following input:

---
title: First post
---

Some text.

---
title: Second post
---

First section.

---

Second section.

This will parse into an array with this structure:

parsed = [
  {
    title: 'First post',
    content: ['\nSome text.\n']
  },
  {
    title: 'Second post',
    content: [
      '\nFirst section.\n',
      '\nSecond section.\n'
    ]
  }
]

License

Apache-2.0

2.0.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago