New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

platformjs-wiki

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

platformjs-wiki

a minimal, simple, file-based wiki/blog for small sites

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

platformjs-wiki

A simple, minimal, Markdown-based file-based wiki/blog middleware component for express intended for small sites.

Installation

$ npm install platformjs-wiki

Usage

app.use( require("platformjs-wiki")("./wiki") );

The above setup will create an in-memory database of all the files in the directory and add this to the res.locals array under the "wiki" variable. Thus the entire content of the wiki is accessible to every rendered template on the site. (This obviously is not intended for large wikis, but rather small sites.)

Internals

As stated, the module is, by design, quite simple.

The middleware essentially does this:

  • Scan all files in the local directory
  • If there is an opening {{{ }}} section, evaluate that as JSON
  • Treat the rest as standard Markdown
  • Merge the Markdown as a content field into the optional JSON section
  • Index all the content by date and tags
  • Make this data accessible via the res.locals.wiki variable

Keywords

blog

FAQs

Package last updated on 05 Oct 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts