These following are the base layouts and are generally not used directly except for custom layouts (like the home page). See the page/article layouts below.
base
- The base template that does not contain any containers, rows or columns.container
- Extendsbase
. The default template to extend which provides a single container and row. Use this to create single row, column-based layouts.
The following layouts are the ones that should be used for creating pages or blog posts.
wide
- Extendscontainer
. Full-width single column.standard
- Extendscontainer
. 8-point single column. This is the default layout for pages.slim
- Extendscontainer
. 6-point single column.
The default
layout is a copy of the default page layout (currently the standard
layout). This is a simple convenience in case the underlying default layout changes in the future.
The following front-matter attributes are supported:
title
- The title of the page/articlesubtitle
(optional) - The subtitle of the page/article that will be shown inline to the titleintro
(optional) - The intro text below the title. Intended to be short and to make a statement.modified
(optional) - The last modified date. This only needs if it's necessary to point out the page has been modified.
A few extra attributes can be used for posts/articles:
date
(optional) - Native Jekyll attribute used for sorting articles. This should be supplied for articles.category
(optional) - Native Jekyll attribute used for grouping articles. This is currently not used, but may be in the future.published
(optional) - Native Jekyll attribute for determining if an article should be published for public view.author
(optional) - Should only be used for writing articles. This is a simple identifier to the author's details defined in the_config.yaml
.
Example Page
---
layout: default
title: "New Page"
intro: "A swift tagline"
---
Content...
Example Article
---
layout: default
title: "New Article"
author: byron
category: "data"
published: false
---
Content...
These are the fragments that are used in layouts. Unless new layouts are being created, these do not need to be used directly.
page_header.html
- Renders a.page-header
block. Takes atitle
and optionalsubtitle
parameters.author.html
- Renders a span of details for the post's author. This assumes theauthor
front-matter variable has been specified and matches one of the authors listed in_config.yaml
.meta.html
- Renders metadata about a blog post including the author (see above include) and the publish and last update date.
Fork or clone (if you have permission) the repo:
git clone git://github.com/chop-dbhi/harvest-site.git
To pull down the media including article images, videos and documents (not necessary for general development), do:
git submodule update --init
- Ruby 2.0.0
curl -L https://get.rvm.io | bash -s stable
rvm install 2.0.0
rvm --default use 2.0.0
gem install jekyll
For faster page indexing (for displaying related articles), do the following (for Redhat/CentOS):
sudo yum install gsl gsl-devel
gem install gsl
Go to the directory and run:
jekyll build
During development, do:
jekyll serve --watch