Author Archives: Tech, tales and imagery

Github/Jekyll site update via Rake⤴


I wanted a quick way to provide useful comments on commits made in development of a Jekyll site which is deployed on GitHub. This method offers a couple of rake tasks to first quickly build the site locally, placing the output into the docs folder; then to commit and push the changes to GitHub once you’re happy. All of this code goes in the Rakefile.


require 'rubygems'
require 'rake'
require 'rdoc'
require 'date'
require 'yaml'
require 'tmpdir'
require 'jekyll'

desc "Generate blog files"
task :generate do{
    "source"      => ".",
    "destination" => "docs"

You can test your site in your development machine (I’m using a Mac) using a python http server to render the static site thus:

$ rake generate
Configuration file: /your/path/to/GitHub/projectname/_config.yml
$ cd docs/
$ python3 -m http.server

You should place an empty .nojekyll file in the root of your project to tell GitHub not to bother rebuilding the site. You’re just deploying static files to the docs folder. Once you’re ready to deploy, you can publish via rake. The rest of the Rakefile looks like this:

# Usage:
# $ rake
# $ rake generate
# $ rake publish
# $ rake publish["Your comment here"]

desc "Generate and publish blog to master/docs"
task :publish, [:var] => [:generate] do |task, args|
  args.with_defaults(var: 'Commit via Rake')
Dir.mktmpdir do |tmp|
    system "mv docs/* #{tmp}"
    system "git checkout -B master"
    system "rm -rf docs/*"
    system "mv #{tmp}/* docs"
    system "git add ."
    system "git commit -a -m #{args.var.inspect}"
    system "git push origin master --force"
    system "git checkout master"
    system "echo Finished."

task :default => :publish

For example, you might publish using this command from the project folder:

$ rake publish["Example updates"]
(in /your/path/to/GitHub/projectname/)
Configuration file: /your/path/to/GitHub/projectname/_config.yml
D	docs/yyyy/mm/dd/some-files.html
Reset branch 'master'
Your branch is up to date with 'origin/master'.
[master abcdefg] Example updates
 n files changed, p insertions(+), q deletions(-)
Enumerating objects: r, done.
Counting objects: 100% (nn/nn), done.
Delta compression using up to x threads
Compressing objects: 100% (mm/mm), done.
Writing objects: 100% (mm/mm), 1234 bytes | 123.00 KiB/s, done.
Total mm (delta nn), reused 0 (delta 0)
remote: Resolving deltas: 100% (nn/nn), completed with nn local objects.
   0aa7f2g..abcdefg  master -> master
Already on 'master'
Your branch is up to date with 'origin/master'.

Or if you’re in a hurry, just issue rake to get the default Commit via Rake commit message.

Data Ethics, AI and Responsible Innovation⤴


In November, I took part in 4 weeks of a 5-week MOOC offered by the University of Edinburgh via the edX platform, Data Ethics, AI and Responsible Innovation. I had various difficulties with the course itself, culminating in a barrier to my continuing.

You can read my notes on the course, including a personal reflection, at the blog I kept on the MOOC.

Climate Change Mitigating Technologies⤴


I had the chance to sit in on the cross-party group on science, in which there were two presentations on the topic, the first from Rebecca Bell, Scottish CCS1 on Carbon Capture and Storage. The second was given by Richard Gow, Drax2 on Bioenergy with Carbon Capture and Storage. The latter presentation called for policy help in rewarding negative carbon emissions, which are an odd omission from the accounting model used in climate change impact measurement.

Both provided a really useful understanding and overview of what carbon emission and capture is about and how it is working, with an emphasis on what is happening in Scotland within a very clear European context. I found the presentations, both neither slick nor sales-focused, extremely engaging and helpful in thinking about CO\(_2\) emissions.

There was a lively and wide-ranging Q & A session chaired by Craig Denham of the RSE. Questions were both technical and social: there was good representation of young people through, for example, asking about the skills required to find careers in CCS. My own question:

For teachers, are there any behaviours they can model for young people that will enable them to take a specific personal responsibility for action in tackling CO\(_2\) accrual in the atmosphere?

I suspect this was a question outside of the scope of the presentations (focusing on individual action) but it was picked up by Craig, which I am thankful for. Richard picked this up first and acknowleged the criticism of BECCS for being remote from personal action but pushed back against this by linking to personal choices such as taking less flights. Rebecca added to that by pointing to transport choices like taking your bike, or wearing a jumper instead of turning up the heating, which are easily modelled and reinforced by educators. She also pointed to SCCS resources related to CfE, and the LfS Scotland resources. I particularly liked the GeoBus Education Resources site which is designed to provide teachers with an introduction to CCS, providing experiments, activities, lessons and homework ideas as well as links to a number of other useful CCS education resources, which are linked to English Key Stage 3 and Scotland’s CfE: this pdf links the resource to the Experiences and Outcomes.

The resources available in the websites of both organisions are very accessible and immediately useful in schools in, for example, projects within the interdisciplinary topic of sustainable energy production. It is particularly warming to see the interest and promotion of positive problem solving through the cross-party group. I am thankful to them for opening up this session to interested parties and applaud the the work being done by SCCS and Drax.


The header image is part of an infographic available at SCCS.

  1. Scottish CCS is “a partnership of the British Geological Survey, Heriot-Watt University, the University of Aberdeen, the University of Edinburgh and the University of Strathclyde working together with universities across Scotland.” 

  2. This is the group that operates Drax Power Station which is moving from coal-fired to biomass and leads on innovation and development in the technologies of Bioenergy with Carbon Capture and Storage (BECCS).