The static site generator that runs landscapesforhealing.com
This website is powered by the nanoc static site generator and the Zurb Foundation front-end framework.
$ git clone git@github.com:logankoester/landscapesforhealing.git
$ cd landscapesforhealing
$ bundle install
$ npm install
$ bower install
$ nanoc compile
$ nanoc view
The website will now be running at http://localhost:3000.
To compile the website, run nanoc compile
. To recompile automatically when
a file is changed, run guard start
.
To add a new page, simply create a Markdown
file under content/
, with some YAML
metadata at the top. The filename will determine the URL.
The title
attribute is required.
If your page should be an article (blog entry), set kind: article
and
created_at: YYYY-MM-DD
. This will add it to the Atom feed,
set an introductory sidebar panel, and display the created_at
date on the page.
You should also set menu: articles
, so it appears in the menu.
To add a page to the top navigation, set the attribute menu: top
.
To add a page to the sidebar menu ("Further reading"), set menu: articles
.
If you set a menu
attribute, you may also set a numeric position
attribute,
relative to the other pages in the menu.
A page can add an optional sidebar panel by including an ERB
block with content for :panel
.
Example:
<% content_for :panel do %>
<h1>Panel content</h1>
<% end %>
You must use HTML, not Markdown syntax inside the panel content.
$ bower update
Frontend javascript is structured as AMD modules (bundled at compile-time),
and external frontend packages are managed by Bower under
components/
.
A preprocess hook (optimize_rjs
) on the nanoc compiler uses the
r.js optimizer to bundle all JavaScript
into output/js/app.bundle.js
, which is excluded from pruning and loaded
by the default layout.
A postinstall hook on Bower (see .bowerrc
) changes updates the paths in
js/config.js
so that the optimizer can find the dependencies required by
any internal javascript modules (put these under js/
and load them from
the main module, js/app.js
).
To add a package, just run bower install <name>
, add it to the dependency
array of the AMD definition where it is needed, and recompile.
$ bundle exec nanoc check --all
Commit your changes and push them to master.
This will trigger a build at http://ci.ldk.io/logankoester/landscapesforhealing/. If the
nanoc check --deploy
tests pass, the new build will be deployed to
landscapesforhealing.com for you.
The production environment runs on Digital Ocean, and the domain is registered through Hover.
All content © 2007-2015 Landscapes For Healing.