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

alleluia

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alleluia

Static blog generator

latest
Source
npmnpm
Version
0.0.8
Version published
Maintainers
1
Created
Source

Alleluia

Alleluia is a static site generator that I use for my own sites.

It is intended to be fast, simple, extensible, and moddable. Alleluia uses a concept of pipelines where input data goes through a series of functions (pipes) with standardized inputs and outputs which transform the data. Alleluia comes with a basic set of pipes but you can write and use your own pipes that fit your needs better.

Installation

The easiest way to install Alleluia is using npm:

npm install -g alleluia

You need to have Node.js installed beforehand.

Get started

Clone or download this sample project.

The only required part of any Alleluia project is alleluia.json config file. It contains all information about your project as well as pipelines that Alleluia runs for your project.

To compile a project, just run alleluia (if you have installed Alleluia globally) in the project directory.

Pipelines

An alleluia workflow consists of one or several pipelines, each pipeline runs pipes on its own set of data and saves the final results with the name of the pipeline. Those results may later be loaded and processed by other pipelines. There are several types of pipes, such as pipe, filter, data, and tee.

The data pipe is used to load saved results of pipelines, while tee is a concept similar to map-reduce. Alleluia passes to a generic pipe data, pipe settings, alleluia config, set of filters and a callback function, to which the pipe should pass the results of its work. filter is a simple function that accepts a string, transforms it and outputs the resulting string. Alleluia runs a given filter against given property of each object in pipeline's data set. Also stock renderTemplate pipe binds all loaded filters to Swig template engine so the filters can be used in templates.

A basic pipeline looks like this:

{
  "name": "posts",
  "pipes": [
    { "pipe": "loadPosts" }
  ]
}

This pipeline uses loadPosts pipe to load posts and does nothing more. Actually it does one more thing: caches the loaded data so it can be used later.

A pipe can accept params:

{ "pipe": "sort", "by": "date", "order": "asc" }

TODO: more on pipelines

Stock pipes

TODO

Stock filters

TODO

License

MIT

Keywords

blog

FAQs

Package last updated on 29 Apr 2018

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