This is a Jekyll-based static site. It requires Ruby to build.
- Install Ruby. You can use homebrew or another package manager as described here. If you use Ruby for other projects you may wish to install with RVM instead.
- Install bundler:
gem install bundler
- Clone this repository and change to its directory:
git clone <url>
cd networkcanvas-web
- Install Jekyll and other dependencies from the Gemfile:
bundle install
To start a server for local development:
jekyll serve
The server will auto-rebuild whenever a file is changed.
To perform a one-time build:
jekyll build
The built HTML and assets are placed in the _site
directory.
To deploy to the networkcanvas server via SSH:
./deploy.sh
If your SSH user is different than your local username, create a .env
config
file:
echo "DEPLOY_ACCOUNT=remoteuser" > .env
This project uses a conventional Jekyll directory structure. Some important files/directories:
_sass/_theme.scss
-- Main SASS file. Includes bootstrap variables, core bootstrap-sass files, and any custom styling._data
-- Contains YAML-formatted structured data that can be used in templates throughout the site._layouts
-- Base templates for pages.default.html
is the most basic template, composing the HTML head, navigation header, and other common components. Other templates add pagetype-specific structure.
The Jekyll docs are a great reference. Some useful pages and concepts:
- Page content is written in markdown, but pages can have their own structured
data specified in Front matter. You
can add arbitrary fields into front matter for use in templates, but for
complex data it might be better to put it in the
_data
directory (seeteam.yml
). - Templates use Liquid syntax. Jekyll has some of its own filters and tags
- Variables available in templates