This repository contains the template for Public Data Lab's blog websites. First, you have to install Jekyll on your computer. Follow the official Jekyll tutorial on their website.
Once you have installed it, create a new repository with your personal account that will contain your blog. Once created, clone it on your computer and run the following command on your terminal:
gem install jekyll bundler
and then
jekyll new /path/to/your/cloned/repository
Now you should have a plain Jekyll website available on your repository. To test it, you can run
bundle exec jekyll serve
by opening the repository in your terminal with Github Desktop (in the menu bar: Repository > Open in Terminal
)
To install the Public Data Lab theme, add the following lines to your Jekyll site's Gemfile
. You can find it in the main folder of your repository
gem 'pdatalab', :git => 'https://github.com/densitydesign/pdatalab.git'
gem "jekyll-remote-theme"
And add these lines to your Jekyll site's _config.yml
:
remote_theme: densitydesign/pdatalab
plugins:
- jekyll-remote-theme
And then execute:
$ bundle
Or install it yourself as:
$ gem install pdatalab
Remember to set the baseurl and url to allow the template to build the correct paths to resources (stylesheets, script files, images, posts) by specifying:
baseurl: /LikeThis # The name of the repository you're using
and
url: https://likethis.org # The url for the Github account (if it's inside the PDL, it will probably be https://publicdatalab.github.io
To customize your website, five different colors are available to be used:
- forest
- midnight
- petrol
- river
- terracotta
The default is terracotta
. You can change it by adding in _config.yml
the following line:
color: forest
To list your research partners, add in _config.yml
the following block:
author:
- name: Partner 1
logo: https://institution/logo.EXT
- name: Partner 2
logo: https://institution/logo.EXT
You can also list the single participants that worked on the project again in the _config.yml
participants:
- name: Participant 1
- name: Participant 2
Add blog posts in the folder _posts
, and name them YYYY-MM-DD-title-of-the-post.md
. You can use markdown to write your blog post. At the top, be sure to copy and paste this block of text, complete with dashes:
---
layout: post
title: "This post demonstrates post content styles"
author: Name 1, Name 2
---
After opening the repository in your terminal (Repository > Open in Terminal
on Github Desktop), run bundle exec jekyll serve
to test your website locally. This will also update the public website.
Once you are done updating your website, go to Github Desktop, name and commit your changes, and push
them online.
Be sure to go to the repository's Settings
, scroll down to Github Page
and publish the master
folder as a website. The blog will be published at that link.
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hello. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.