• Stars
    star
    259
  • Rank 157,669 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 14 years ago
  • Updated over 12 years ago

Reviews

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

Repository Details

A flexible static site generator for node.js

Petrify

A simple and flexible static site generator for node.js

Why use a static site generator?

  • Static files are fast - You never know, you might just get slashdotted...
  • Plays well with version control - You can have a complete history of both the content and the code in git, easily backed up.
  • You can use your text editor of choice - I like to write my content in Vim, not in a textarea!
  • Less security concerns - No SQL injections or other attacks associated with dynamic content or exposing your admin area to the web.
  • Easy to deploy - You can just rsync or FTP the site to your server, nothing fancy needs to be installed on it. You could have git do this automatically on commit if you like... or, like me, you can have the server rebuild the site automatically when you push to it.
  • You no longer need to serve your own dynamic content - Lots of content you would normally want a database for can now be included using JavaScript. You can add comments via Disqus, you can embed calendars from Google Calendar... Many of these problems have already been solved. better. ;)

Why use Petrify?

  • Flexibility - Most other site generators focus on blogs, but Petrify can be used for a wide range of sites, from project documentation to event listings. This is achieved through allowing you to parse the content data in whichever way you like.
  • Write your views in JavaScript - Petrify uses JavaScript for parsing content. JavaScript is a widely used language, and if you know enough about HTML to want to use a static site generator, you probably know enough JavaScript to use Petrify.
  • Write your content in Markdown - Markdown is an easy to write, easy to read markup language inspired by the way people write in plain text emails. This works well if you host projects on GitHub, which is already very markdown friendly. You can run a Petrify site generator on the doc directory of your project and have pretty HTML docs for your own domain.

Getting started

First, install the latest version of node.js. Petrify uses git submodules for the rest of its dependencies. Once you've cloned the repository, do:

git submodule update --init --recursive

Then, cd to the examples directory and run the build script. This will create a www directory with a bunch of HTML files inside. Voila! you've just generated your first site. For now, the example site and the files in the doc directory will have to be enough to get you started.

More Repositories

1

async

Async utilities for node and the browser
JavaScript
28,095
star
2

highland

High-level streams library for Node.js and the browser
JavaScript
3,427
star
3

nodeunit

Easy unit testing in node.js and the browser, based on the assert module.
JavaScript
1,899
star
4

jam

JavaScript package manager - using a browser-focused and RequireJS compatible repository
JavaScript
1,497
star
5

forms

An easy way to create, parse and validate forms in node.js
JavaScript
1,010
star
6

pithy

An internal DSL for generating HTML in JavaScript
JavaScript
435
star
7

nimble

A really tiny functional JavaScript and async flow-control library
JavaScript
329
star
8

cookie-sessions

Secure cookie-based session middleware for Connect
JavaScript
97
star
9

quip

A chainable API for response objects in node
JavaScript
92
star
10

dispatch

A regular expression URL dispatcher for Connect
JavaScript
84
star
11

magery

JavaScript templates for progressive enhancement
JavaScript
56
star
12

copykitten

Tiny immutable JSON data structures
JavaScript
40
star
13

jquery.notify.js

Ubuntu-style notifications within a web browser
JavaScript
25
star
14

couchr

Lightweight CouchDB request library for Node and the browser
JavaScript
22
star
15

hoodie-drawing

Hoodie drawing demo app
JavaScript
20
star
16

cpm

CouchDB Package Manager - a tool for the management of CouchApps and associated libraries
JavaScript
16
star
17

wmd

wanton markdown - a markdown parser based on showdown
JavaScript
15
star
18

blog

CouchApp code used to run my blog
JavaScript
15
star
19

tamawiki

I'm learning Rust!
Rust
13
star
20

chicken-toml

A TOML parser for CHICKEN Scheme built with comparse
Scheme
11
star
21

docker-hoodie

Basic docker file for trying out hoodie
Shell
10
star
22

bootstrap-less

Kanso package providing uncompiled less files for bootstrap with images and js as attachments
JavaScript
10
star
23

behaviors

A (really) simple way to check a modules export's in node.js. Inspired by behaviors in Erlang.
JavaScript
9
star
24

snowy

HTTP server for CHICKEN Scheme
C
8
star
25

events

Browser port of the node.js events module
JavaScript
8
star
26

lolcorp

Intentionally insecure example Node.js applications
JavaScript
7
star
27

raspberry-pi-gpio

Raspberry Pi GPIO library for CHICKEN Scheme
Scheme
6
star
28

scrawl

Dumb comment parsing
JavaScript
6
star
29

pithy2

A Typescript-friendly and human-friendly API for building DOM elements
TypeScript
5
star
30

snake

Snake game for the BBC micro:bit
Python
5
star
31

erlmpd

An Erlang client module for MPD
Erlang
5
star
32

chicken-leveldb

CHICKEN Scheme bindings to LevelDB
Scheme
5
star
33

python-magery

Python implementation of Magery templates
Python
5
star
34

highland-couchr

Highland streams style API to CouchDB, using couchr under the hood
JavaScript
4
star
35

mutiny

Rust
4
star
36

chicken-sodium

CHICKEN Scheme bindings to libsodium crypto library
Scheme
3
star
37

0

3
star
38

ghstats

allows you to compare github users followers and project watchers
JavaScript
3
star
39

couchr-browser

Lightweight library for making CouchDB requests, based on jQuery
JavaScript
2
star
40

couchi

CouchDB command-line interface
JavaScript
2
star
41

magery-tests

Test suite for server implementations of Magery templates
HTML
2
star
42

chat

Kanso chat app
JavaScript
2
star
43

lmdb-lolevel

Low-level CHICKEN Scheme bindings to LMDB, closely following the C API
Scheme
2
star
44

condor

C O N D O R
JavaScript
2
star
45

chicken-level

abstract API layer for chicken-leveldb
Scheme
2
star
46

gamejam

First Play Sheffield Game Jam!
JavaScript
2
star
47

chicken-ldap-bind

Implements LDAP bind for authentication using OpenLDAP
Scheme
2
star
48

library

CouchApp for storing templates
JavaScript
2
star
49

chicken-gumbo

C binding to the Gumbo HTML parser for CHICKEN Scheme
Scheme
2
star
50

dust

P2P event streams
Scheme
2
star
51

users-core

Core resources for the users app, must be used with a theme (eg, users-default)
JavaScript
2
star
52

gh-label-dashboard

An example of using the github search API to query labels across all repositories in an organisation
1
star
53

validatejs

JavaScript
1
star
54

webhook-test

1
star
55

users-default

Default bootstrap theme for users app
1
star
56

chicken-sublevel

Namespaced access to leveldb implementations
Scheme
1
star
57

chicken-level-sexp

Automatically read and write s-expressions to leveldb
Scheme
1
star
58

chicken-fnmatch

Test filenames against shell wildcard patterns using fnmatch
Scheme
1
star
59

jambot

IRC bot for #jamjs
JavaScript
1
star
60

mochiproxy

Easily proxy mochiweb requests, based on the CouchDB proxy module
Erlang
1
star
61

highland-couchdb-alldocs

Provides Highland streams for reading all keys/docs in a CouchDB database
JavaScript
1
star