Flexible processor of files. Provides extra information taken from the path and front-matter and other tools.
Last updated 5 years ago by leichtgewicht .
ISC · Original npm · Tarball · package.json
$ cnpm install fs-page 
SYNC missed versions from official npm registry.

Build Status Coverage Status js-standard-style


fs-page is a node.js library(package) to process files on the file-system as content-source for a html page rendered by a system.

Why this system?

Various static site generators use files on the file system to generate html pages for blogs. This library takes care of various basic functionalities that make sense to put in a library:

  • Front matter: It loads frontmatter information from the file
  • Date detection: Put a date in the file path and the date will be sortable
  • Slug creation: If you want to create a url based on the file path, this library does it.
  • Excerpt creation: automatically get excerpts for files
  • Image list extraction: A standard way to get the used images of a file in the html code.
  • Published-check: The default API comes with a "published" flag system that only lists content that isn't explicitly "not published".
  • Link resolution: Link files as you would on the fs

How does it work?

First: Install the package.

$ npm i fs-page --save

Then you can import its main functionality like this:

var processFile = require('fs-page/processFile')


With this you can process any string:


If you just want to process the data using a string you can use

var processData = require('fs-page/processData')

instead of processFile

Current Tags

  • 1.1.0                                ...           latest (5 years ago)

2 Versions

  • 1.1.0                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (9)
Dev Dependencies (3)
Dependents (0)

Copyright 2014 - 2017 © taobao.org |