Folderise
Folderise is a express middleware to create static (or semi-static) websites from a folder of markdown files.
Folderise was developed for Frontyard Project's website as a simple way for multiple authors to easily modify the organisations website. We used a shared dropbox folder, so that any changes to the files/folders immediately caused the website to update.
Guide:
- Every folder becomes a page. The title of the folder is the name of the page.
- Any .md file included in a folder will be parsed as Markdown and rendered in alphabetic order.
- After .md files, if there are other files they will rendered as download links.
- Any image will be served as an image at the bottom of the page.
- Any folders, files, or images that begin with a . or an _ will not be rendered.
- Listings will be alphabetical.
- The sites pages are cached in _tmp.html files inside each folder.
- Folderise uses ckokidar to listen for any changes to the website folder and automatically rerenders any changes.
- template.html is used as the base folder
Folderise is a based on the python static website generator Folders.
Still to do:
- enable template to be overriden in settings.
- include .css or .less
Install:
npm install folderise
Folderise requires a settings.json file with the following options:
"port": /* port for server to listen on */ "title": /* title of your site */ "folder": /* path/to/folder */ "plugins": /* list of plugins */
Check out the example provided for how to intergate Folderise into your express application.
var express = ;var helmet = ;var bodyParser = ;var errorHandler = ; var options = ;var folderise = options; var port = optionsport;var app = ; app;app;app;app;app; app;app;app; app;
Note: If not using any folderise plugins you can increase performance by using Nginx to serve static content.