Make sure you are using the right version of Ruby as per the .ruby-version
file. RVM can help with that.
Run the following command to install the Gem dependencies:
gem install bundler
bundle install
CSS is compiled and preprocessed with Jekyll's Sass preprocessor. All working files are found in css
and _sass
, and compile to _site/css
.
Prepend the filenames of include files (Sass partials) with _
to avoid writing those files to the output directory.
The main CSS file:
├── css
│ └── style.scss
The CSS partials:
├── _sass
│ ├── _header.scss
│ ├── _type_scale.scss
│ ├── _variables.scss
To maintain consistent style, use the Editorconfig plugin for your text editor or IDE.
To serve the site at http://localhost:4000, run the following command:
bundle exec jekyll serve
The slider is a dynamic element that can be reused with any content provided that it follows the same format. An example of the format required is in _data/demos.yml
.
The slider needs the fancybox_items
variable assigned to it before including it.
The following is an implementation of Fancybox on the Product page (demos.html), with the items passed to the Fancybox partial:
{% assign fancybox_items=site.data.demos %}
{% include fancybox.html %}
Jekyll is updated frequently. To ensure that the site locally looks as it does on Github pages, periodically you may need to update the required dependencies and run the site. Update using the following command:
bundle update
This is the directory structure to maintain pretty URLs:
├── index.md
└── product
└── index.md
The Products page will live at domain.com/product/
instead of domain.com/product.html
.
A page, e.g. ./product/index.md
, generally looks like this:
---
title: Product
layout: product
summary: SpookyStuff is a scalable query engine for web scraping, data mashup, and acceptance QA
---
SpookyStuff scales up data collection by distributing web clients to many machines.
SpookyStuff is a scalable query engine for web scraping, data mashup, and acceptance QA, powered by Apache Spark.
A more detailed blurb about SpookyStuff, perhaps a couple of paragraphs.
It's Markdown and contains Yaml front-matter like title
, layout
, etc. (variables).
- title: title of the page (shows up in the window title)
- layout: layout of the page
- meta_description: meta tag description, used by search engines
- meta_keywords: meta tag keywords, used by search engines
Other pages may utilize other front-matter on a per-layout basis.
The site utilizes Yaml files to provide data to the templates. Read how Jekyll works with Yaml data (and other formats) here.
All HTML should go in the layout file for that page.
Each page has a layout assigned to it in its front-matter, e.g. of ./index.md
:
---
title: Home Page
layout: default
---
The above example uses _layouts/default.html
as its layout.
Partials are defined in: _includes
and are included on pages and layouts as so:
{% include header.html%}
If you get an SSL certificate warning, you can try building the latest, stable release of Ruby (as per the .ruby-version
file).
Alternatively, you can try to resolve the SSL issues with your current version of Ruby by following the directions on this gist.