Skip to content

pentandra/lifepreserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

eb793fe · Aug 5, 2018
Feb 18, 2018
Oct 25, 2016
Aug 4, 2018
Aug 5, 2018
Aug 5, 2018
Mar 4, 2018
Oct 28, 2016
Sep 22, 2017
Sep 7, 2017
Feb 16, 2017
Feb 25, 2018
Jun 6, 2017
Mar 27, 2017
Mar 27, 2017
Nov 25, 2016
Nov 25, 2016
Apr 15, 2014
Sep 12, 2017
Nov 26, 2016
Nov 22, 2016
Aug 2, 2017
Feb 25, 2018
Dec 16, 2016
Dec 6, 2015
Sep 22, 2017
Jul 6, 2017
Dec 16, 2016
Jun 23, 2017
Aug 20, 2017
Aug 27, 2017
Feb 25, 2018

Repository files navigation

Lifepreserver

This is the website for Pentandra Research Solutions.

Development

The source for this project is built using nanoc.

Before compiling…

The following external dependencies or system packages need to be installed and in scope before compiling:

  • Ruby (with bundler, i.e. gem install bundler)
  • pandoc (>= 2.0) for markdown processing
  • ConTeXt for PDF generation of reports
  • hunspell (>= 1.3.4) for spell-checking
  • git for version tagging and history management
  • A JavaScript runtime, such as node (or any runtime that ExecJS supports), for UglifyJS and bower. (note: currently you need to install bower manually, e.g. npm install bower -g)

Optional dependencies

Then clone this repo (including submodules), install bower components and Ruby gems…

As follows:

$ git clone https://github.com/pentandra/lifepreserver.git
$ cd lifepreserver
$ git submodule init
$ git submodule update
$ bower install
$ bundle install --with development test

And compile!

$ bundle exec nanoc [compile] [--verbose] [--env=development]

Start the HTTP server and request the page in your browser

# either
$ nanoc static-view # if you are only dealing with statically generated pages
# or
$ nanoc server      # if you are dealing with both the static and dynamic aspects of the site

And view the page in your browser at port 3000 for nanoc static-view or port 4125 for nanoc server.

Contributing

This repository uses GitFlow to manage development and release activity. When starting a new feature, page, blog post, et cetera, please create a new branch for it based on the develop branch to ease review and integration.

  • Do your best to adhere to the existing coding conventions and idioms.
  • Don’t use hard tabs, and don’t leave trailing whitespace on any line. Before committing, run git diff --check to make sure of this.

Environments

This project uses Nanoc environments for development, staging, and production builds. Be sure to set the NANOC_ENV shell variable or command line argument to set the current environment before a build, for example:

$ export NANOC_ENV=development # before running Nanoc commands

or

$ nanoc [command] --env=development # with each command

A production build must happen on a git tag, or the build will abort.

For sake of completeness, a static_only environment exists that will build only the static items of the website, to give a build environment that avoids dependence upon any Lua libraries that may be needed to build the dynamic code upon which OpenResty runs.

Thanks

Thanks to the people that helped me come to grips with the power of nanoc, including:

Also, please see the colophon for more raving attributions!