snowplow.github.com is the source code and content for the Snowplow website.
The site is built in Jekyll and served by GitHub Pages. Thanks to the great people of GitHub for this fantastic service.
All content is copyright © 2012-2015 Snowplow Analytics Ltd and not to be reused without permission.
We welcome fixes and improvements! In particular on the analysis side, there is a wide range of ways Snowplow can be used, and we can't possibly hope to cover them all ourselves. If you've used it for a specific type of analysis, we'd love you to share it here. Please fork the repo, make your changes and then create a pull request.
- Fork the repository
- Clone your fork to your local machine
- Make the desired changes to the website. More details on this are below
- Make a pull request. We will incorporate your updates to the site ASAP
- Making changes locally
- Adding a new blog post
- Adding pages to the website (not the blog)
- Embedding images
- Links between pages
- Side menus
- Previewing changes locally
- Committing your changes and deploying them to GitHub Pages
Once you have the repo cloned locally, you can make changes to it. More details on specific changes (e.g. adding a blog post etc.) can be found below.
#### 2. Adding a new blog postThis is straightforward. Create a new markdown file in the _posts directory, with the filename format YYYY-MM--DD-title.md
.
In the file add the following YAML Front Matter to the top of the post:
---
layout: post
title: Snowplow JavaScript Tracker 0.14.0 released with new features # Full title
title-short: JavaScript Tracker 0.14.0 # REQUIRED for release posts, OPTIONAL for other blogposts (used in menu and breadcrumb)
tags: [snowplow, javascript, tracker]
author: Fred
category: Releases
---
Then type in the rest of the post, in markdown, as normal.
#### 3. Adding pages to the website (not the blog)Adding a page to the rest of the site is reasonably straightforward.
First, create an appropriately titled markdown file and save it to the appropriate directory. (The site folder structure reflects the site information structure, so if you want to create a new page in the 'Product' section it's best to save it in the product folder.)
Second, add a YAML Front Matter to the top of the Markdown file e.g.:
---
layout: page # set to page (unless the page requires a custom design)
group: documentation # first level in navigation
subgroup: analytics # second level in navigation (delete otherwise)
breadcrumb: customer analytics # third level in navigation (delete otherwise)
subbreadcrumb: attribution # fourth level in navigation (delete otherwise)
title: The Snowplow Analytics cookbook # Title as sent to the browser
description: The Snowplow Analytics Cookbook contains a wealth of recipes for using Snowplow data to answer your business questions. # Description as passed to Google
---
Images are committed to the appropriate assets/img
folder (depending on which section the image belongs). It can then be referenced in the Markdown as normal.
When adding links to between pages on the site:
- Always use relative URLs e.g.
/analytics/catalogue-analytics/overview.html
- Remember all URLs end in
.html
Side menus should automatically update with new blog posts / web pages as appropriate.
When the side menu is generated (Jekyll compiles the site) it fetches all the different pages, filters them by category and uses this to populate all the menus. To see how this is done, refer to the _includes/snowplow/sidebar_standard
and _includes/snowplow/sidebar_blog
.
We strongly advise you compile and preview the site locally before pushing updates to production.
In order to compile the website locally, you will need be running VirtualBox and Vagrant.
Navigate to the repo, then build then vagrant up:
$ vagrant up
That will take about 15 minutes to run initially. Once your VM is ready, you can ssh on and build the website
$ vagrant ssh
$ cd /vagrant
$ bundle exec jekyll serve
In your host machine, open a browser and navigate to http://localhost:4001
and bingo! There's the website!
When you are happy with the updates:
- Merge them with the master branch
- Push the master branch to origin
The good people at GitHub will compile the website and serve it on http://snowplowanalytics.com
! Thank you [GitHub pages] (http://pages.github.com/).
Snowplow has two color schemes.
The main one. From dark to light:
- #1F294D
- #4C5371
- #797F94
- #A5A9B9
- #D2D4DB
And a purple one. From dark to light:
- #2D479A
- #586BAE
- #8290C2
- #ADB5D6
- #D5DAEB