• This repository has been archived on 14/Oct/2020
  • Stars
    star
    214
  • Rank 184,678 (Top 4 %)
  • Language
    CoffeeScript
  • Created almost 12 years ago
  • Updated almost 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Flow-based reimplementation of the Jekyll static site generator

noflo-jekyll Build Status

Flow-based reimplementation of the Jekyll static site generator. This provides several advantages for Node.js and especially NoFlo developers:

  • Pure JavaScript, no need for Ruby or other runtimes in your environment. Especially handy if you're using Grunt for site generation
  • Other data sources, in NoFlo everything is just a flow of data. You could easily plug in other data sources than the file system. For example, database query results
  • Different converters, don't want to use Markdown? Just plug in your own mark-up processor component
  • Different template engines, don't want to use Liquid? Just plug in your own template processor component
  • Use as library or executable, this Jekyll implementation is just a NoFlo graph. You can use it in other NoFlo applications, as a Node.js module, or as a command-line executable

However, as with any reimplementation of a application being actively developed, there are also some potential caveats to observe.

Structure

NoFlo Jekyll has been implemented as a NoFlo graph. Most of the logic is handled by various existing NoFlo components, but there are also some places where implementing things as a custom component made sense. Over 85% of the codebase is completely reusable, however.

Here is how the main flow looks like when visualized using NoFlo UI:

Main process flow

You can find the main flow and the different subgraphs from the graphs folder.

Installation

If you want to use this as a command-line executable, then the easiest option is to install it globally with:

$ npm install -g noflo-jekyll

If you want to use it as a library inside a bigger application, then just install it as a dependency by:

$ npm install noflo-jekyll --save

Command-line usage

Since this project aims for feature parity with Jekyll, the command-line usage is similar. To generate a site, run:

$ noflo-jekyll source_dir target_dir

Usage in Node.js applications

The site generation graph can also be used as a library in Node.js applications.

var Jekyll, generator;
Jekyll = require('noflo-jekyll').Jekyll;

// Prepare the site generator
generator = new Jekyll('source_dir', 'target_dir');

// Event handling
generator.on('start', function () {
  console.log("Build started");
});

generator.on('error', console.error);

generator.on('end', function (end) {
  var seconds = end.uptime / 1000;
  console.log("Build finished in " + seconds);
});

// Start the process
generator.run();

Usage in NoFlo graphs

The main site generation flow is exposed as the jekyll/Jekyll graph. Here is a simple example of using it in another graph:

# Directory setup
'/some/source/directory' -> SOURCE Generator(jekyll/Jekyll)
'/some/target/directory' -> DESTINATION Generator()

# Outputs
Generator() GENERATED -> IN Drop(Drop)
Generator() ERRORS -> IN Display(Output)

Known issues and differences with Ruby Jekyll

Template incompatibilities

The Liquid Templating library we use, liquid-node does not cover 100% of the Liquid spec, so some template parameters that work with Jekyll might not yet work.

We're working with the liquid-node developers to improve the coverage, and this is something you can also help with. Please report an issue if you are using something that doesn't work!

Newer Jekyll features

When this project was started, Jekyll was still in the pre-1.0 stage, and its development had stopped. Since then, its development resumed, and 1.0 added features that we don't yet provide. These include:

  • Draft posts
  • Timezones
  • Baseurl

Please report any issues you encounter with these or other Jekyll features.

No web server

The Ruby Jekyll includes a rudimentary web server for testing purposes. As that is outside of the scope of static site generation, this feature was not included into the NoFlo Jekyll implementation. You can serve the generated pages in many ways, including grunt-contrib-connect, simple-server, or NoFlo webserver.

Testing and development

Pull requests are welcome for any missing Jekyll features or other issues! If you want to work with the repository, it is best to be able to test it locally.

Our main body of tests consists of a Jekyll website source in test/fixtures/source that we have generated to a static site with the Ruby Jekyll. We run NoFlo Jekyll against the same sources, and check that the results are identical (save for some whitespace differences).

If you find things NoFlo Jekyll doesn't handle correctly, add them to that Jekyll site source, and then run Ruby Jekyll fixture regeneration with:

$ grunt jekyll

After this you should be able to run the tests with:

$ grunt test

More Repositories

1

noflo

Flow-based programming for JavaScript
JavaScript
3,497
star
2

noflo-ui

NoFlo Development Environment
JavaScript
767
star
3

noflo-nodejs

Command-line tool for running NoFlo programs on Node.js
JavaScript
91
star
4

noflo-ui-server

DEPRECATED, see README
JavaScript
63
star
5

noflo.github.io

The NoFlo website
HTML
54
star
6

dataflow-noflo

DEPRECATED prototype. To see the current work:
JavaScript
54
star
7

noflo-browser-app

Template for NoFlo browser applications
JavaScript
45
star
8

noflo-core

Core components for NoFlo
JavaScript
38
star
9

noflo-flow

Flow Control for NoFlo
JavaScript
29
star
10

noflo-react

Facebook React components for NoFlo
JavaScript
20
star
11

noflo-assembly

Industrial approach to writing NoFlo applications
JavaScript
19
star
12

noflo-canvas

Generative Canvas 2D drawing with NoFlo.
CoffeeScript
18
star
13

noflo-cad

CAD solid modelling components for NoFlo
CoffeeScript
18
star
14

noflo-github

GitHub components for NoFlo
CoffeeScript
15
star
15

visualize

Simple FBP visualizer
JavaScript
15
star
16

noflo-polymer

Polymer components for NoFlo
JavaScript
15
star
17

noflo-graphviz

NoFlo visualization tools for GraphViz
JavaScript
14
star
18

noflo-image

Image processing components for NoFlo.
CoffeeScript
13
star
19

polymer-noflo

Polymer Web Components wrapper for NoFlo
HTML
12
star
20

noflo-webserver

Web server components for NoFlo
CoffeeScript
12
star
21

noflo-runtime-base

Base library for building NoFlo runtimes
JavaScript
11
star
22

noflo-gnome

NoFlo runtime for GNOME development
JavaScript
11
star
23

noflo-runtime

FBP runtime components for NoFlo
CoffeeScript
11
star
24

noflo-ardrone

UNMAINTAINED ARDrone components for NoFlo
CoffeeScript
11
star
25

react-example

CoffeeScript
11
star
26

noflo-runtime-msgflo

NoFlo runtime for AMQP/MQTT
CoffeeScript
10
star
27

grunt-init-noflo

grunt-init template for scaffolding NoFlo projects
JavaScript
10
star
28

noflo-math

Mathematical operations for NoFlo
JavaScript
9
star
29

noflo-browser

NoFlo build for the browser used as default runtime in Flowhub
JavaScript
9
star
30

noflo-clmtrackr

Noflo face feature tracking with auduno/clmtrackr
JavaScript
8
star
31

noflo-physics

Physics components for NoFlo
CoffeeScript
8
star
32

noflo-seriously

(not fully working yet)
CoffeeScript
8
star
33

noflo-interaction

User interaction components for NoFlo
CoffeeScript
7
star
34

noflo-adapters

Packet Format Conversion for NoFlo
CoffeeScript
7
star
35

noflo-3dprint

NoFlo components for interacting with 3d printing services
CoffeeScript
7
star
36

noflo-strings

String Utilities for NoFlo
JavaScript
7
star
37

noflo-routers

Routing Packets in NoFlo
JavaScript
7
star
38

noflo-objects

Object Utilities for NoFlo
JavaScript
7
star
39

noflo-html

HTML handling components for NoFlo
CoffeeScript
6
star
40

noflo-dom

Document Object Model components for NoFlo
CoffeeScript
6
star
41

noflo-graph

Graph manipulation components for NoFlo
JavaScript
6
star
42

noflo-ccv

ccv face detection for noflo
CoffeeScript
6
star
43

noflo-couchdb

CouchDB components for NoFlo
CoffeeScript
6
star
44

noflo-xml

XML handling components for NoFlo
JavaScript
6
star
45

noflo-xpress

High-level Express.js components for NoFlo
JavaScript
6
star
46

noflo-filesystem

Filesystem components for NoFlo
JavaScript
5
star
47

noflo-test

DEPRECATED: Use fbp-spec instead. Fluent test framework for NoFlo components
CoffeeScript
5
star
48

noflo-websocket

WebSocket components for NoFlo
CoffeeScript
5
star
49

noflo-runtime-websocket

NoFlo runtime for execution on Node.js over WebSockets
JavaScript
5
star
50

noflo-css

Cascading Style Sheets components for NoFlo
CoffeeScript
5
star
51

noflo-thegrid

TheGrid components for NoFlo
CoffeeScript
4
star
52

noflo-amqp

Advanced Message Queuing Protocol components for NoFlo
CoffeeScript
4
star
53

noflo-tween

Timeline components for NoFlo
JavaScript
4
star
54

noflo-packets

Packet Utilities for NoFlo
CoffeeScript
4
star
55

noflo-localstorage

HTML5 LocalStorage components for NoFlo
CoffeeScript
4
star
56

noflo-sharp

Fast image resizing components for NoFlo.
CoffeeScript
4
star
57

noflo-ipfs

IPFS components for NoFlo
CoffeeScript
4
star
58

noflo-knex

Knex.js database query components for NoFlo
CoffeeScript
4
star
59

noflo-groups

Group Utilities for NoFlo
CoffeeScript
4
star
60

noflo-webaudio

Web Audio API for NoFlo.
CoffeeScript
4
star
61

grunt-noflo-browser

Grunt plugin for easier browser builds of NoFlo
JavaScript
4
star
62

noflo-liquid

Liquid Templating components for the NoFlo flow-based programming environment
JavaScript
4
star
63

noflo-gestures

Gesture recognition library for NoFlo
CoffeeScript
3
star
64

noflo-mirobot

Components for Mirobot.io
CoffeeScript
3
star
65

noflo-ajax

AJAX components for NoFlo
CoffeeScript
3
star
66

noflo-component-loader

NoFlo Component Loader generator for WebPack and other module bundlers
JavaScript
3
star
67

noflo-runtime-iframe

IFRAME runtime for NoFlo
CoffeeScript
3
star
68

grunt-noflo-manifest

DEPRECATED: Grunt plugin for updating NoFlo manifest files. Use fbp-manifest instead
JavaScript
3
star
69

noflo-diffbot

Diffbot components for NoFlo
CoffeeScript
3
star
70

noflo-gpio

GPIO components for Embedded Linux (RPi/BBB etc)
JavaScript
3
star
71

noflo-mandrill

Mandrill email API components for NoFlo
CoffeeScript
2
star
72

noflo-video

Video handling components for NoFlo
CoffeeScript
2
star
73

noflo-helper-arrayable

Helper for building components that can work on arrays or individual inputs
JavaScript
2
star
74

noflo-ducksboard

Ducksboard components for NoFlo
CoffeeScript
2
star
75

noflo-swagger-client

Generate NoFlo components for accessing a Swagger/OpenAPI service
JavaScript
2
star
76

noflo-amd

Asynchronous Module Definition components for NoFlo
CoffeeScript
2
star
77

noflo-redis

Redis components for NoFlo
JavaScript
2
star
78

noflo-git

Git components for NoFlo
CoffeeScript
2
star
79

noflo-markdown

Markdown processing components for NoFlo
JavaScript
2
star
80

noflo-gravatar

Gravatar components for NoFlo
JavaScript
2
star
81

noflo-mqtt

MQTT components for NoFlo
CoffeeScript
2
star
82

noflo-subprocess

NoFlo library to execute commands as subprocess
JavaScript
2
star
83

noflo-yaml

YAML handling components for NoFlo
JavaScript
2
star
84

noflo-google

Google API components for NoFlo
CoffeeScript
1
star
85

noflo-assembly-db

Reusable database components for NoFlo Assembly Lines
JavaScript
1
star
86

noflo-s3

S3 components for NoFlo
CoffeeScript
1
star
87

noflo-mclighting

NoFlo components for interacting with McLighting
JavaScript
1
star
88

noflo-mq

Message Queue components for NoFlo
CoffeeScript
1
star
89

noflo-hackrf

HackRF components for NoFlo
CoffeeScript
1
star
90

noflo-lint

NoFlo project linting tool
CoffeeScript
1
star
91

noflo-facebook

Facebook components for NoFlo
CoffeeScript
1
star
92

noflo-stanbol

Apache Stanbol components for NoFlo.
CoffeeScript
1
star
93

noflo-peer

NoFlo wrapper for peers/peerjs P2P audio, video, and data via WebRTC.
CoffeeScript
1
star
94

grunt-noflo-lint

Grunt plugin for linting NoFlo projects
JavaScript
1
star
95

noflo-stripe

Stripe payment processing components for NoFlo
CoffeeScript
1
star
96

component-fetcher

Utility for fetching the public list of NoFlo components and component libraries
CoffeeScript
1
star
97

noflo-blockchain

blockchain.info components for NoFlo
CoffeeScript
1
star
98

noflo-color

Color manipulation for NoFlo.
CoffeeScript
1
star
99

finance-tracker

Finance tracker API example for NoFlo Assembly line
JavaScript
1
star
100

noflo-svg

(WIP)
CoffeeScript
1
star