Jekyll plugin that shows climate change trends
Failed to load latest commit information.
.gitignore Getting started Jun 8, 2014
LICENSE Initial commit Jun 8, 2014 Update docs Oct 17, 2014
co2.rb Refactoring to catch errors; but it doesn't work yet Jan 26, 2017
screenshot.png Update docs Oct 17, 2014

Jekyll CO₂

Written by William Denton.

This is a plugin for the static web site generator Jekyll to show the change in atmospheric CO₂ at the Mauna Loa observatory in Hawaii. It was inspired by CO2Now. The data comes from the NOAA's Earth System Research Laboratory.

It shows the CO₂ concentrations for the latest known month (usually last month, but sometimes the month before that) over the last 15 years in a text sparkline that looks something like this: ▁▁▂▂▂▂▃▃▃▄▄▄▅▅▅▅▆▆▆▇▇.

In a browser it looks like this:


How to install

Download co2.rb and put it in your _plugins directory. That's all!

How to use

The plugin creates an include file: _includes/co2.html. Include it in a web page like this:

{% include co2.html %}

When the page is rendered, the tag will be replaced by a short block of HTML like this:

<div id="co2">
<span class="sparkline"><span title="355.63">▁</span>[13 years]<span title="395.28">▇</span></span>
<p><span class="co2_title">Atmospheric CO₂ at Mauna Loa (ppm) in September over the last 20 years</span> </p>
<span class="co2_source">(<a href="">Source</a>)</span>

You could style it with CSS like this:

#co2 {
  border: thin solid green;
  padding: 5px;

#co2 .co2_title {

#co2 .sparkline {
    font-size: smaller;

#co2 .co2_source {
  font-size: smaller;