1.6.2 • Published 7 years ago

noddity-retrieval v1.6.2

Weekly downloads
151
License
WTFPL
Repository
github
Last release
7 years ago

Build Status

Noddity Retrieval

This module provides an API to a Noddity data store full of posts and a list of said posts.

You give it an http(s) root, and that's all it needs to provide

  • an async getter function to download parsed post objects
  • an async getter function to download an array of post objects based on the index.json file from the root directory

So I have this idea, right? Where your blog posts could just be a directory with an index file and a bunch of markdown files, just being served out onto the internet.

The idea is that your root directory of posts contains:

  • An index.json file, containing a JSON array of strings representing the file names that are your "official" blog posts, in order.
  • Whatever markdown files you want to be accessible, with metadata stored in a format amenable to text-metadata-parser.

Usage

var retrieve = new Retrieve('http://remote-server.com/blogfiles/')

retrieve.getIndex(function(err, index) {
	if (!err && index.length > 0) {
		// Get the most recent post
		retrieve.getPost(index.pop(), function(err, post) {
			console.log("Found post named " + post.metadata.title)
			console.log("The words inside it are:\n" + post.content)
		})
	}
})

This is the core module of the Noddity cms.

License

WTFPL

1.6.2

7 years ago

1.6.1

7 years ago

1.6.0

7 years ago

1.5.3

8 years ago

1.5.2

8 years ago

1.5.1

9 years ago

1.5.0

9 years ago

1.4.0

9 years ago

1.3.1

9 years ago

1.3.0

9 years ago

1.2.0

9 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.1

10 years ago

1.0.0

11 years ago

0.0.1

11 years ago