informatics-lab / blog

The Met Office Lab Jekyll Blog
http://www.informaticslab.co.uk
Other
3 stars 6 forks source link

Met Office Lab Jekyll Blog Build Status

This is the blog for the Met Office Lab.

Contributing

For instructions on writing blog posts, updating projects or updating the site see CONTRIBUTING.md.

Build the site locally

Note: You must run with node version < 7.

Pre-requisites

Set up

Run

# Serve the site
grunt serve

Blog images

This repo contains a neat helper script for uploading pictures to the blog. It takes an image path as an argument and returns a url that you can use in your blog post. You can also copy an image to your clipboard and run the command with no arguments and it will upload from your clipboard.

Requirements

Setup

Once you've got this repo cloned somewhere and you've installed the requirements you can just run the scripts/upload_image.sh script directly, but you'll probably want to setup an alias to it in your ~/.bashrc

alias blogimage=<path-to-your-local-blog-repo>/scripts/upload_image.sh

Example usage

$ blogimage ~/Downloads/alberto-arribas.png
https://images.informaticslab.co.uk/misc/15dbc2c47b14fb37cbc0ce650fee0de0.png
Copied the url to your clipboard!
$ blogimage
Uploading from your clipboard
https://images.informaticslab.co.uk/misc/d7420c5a925dac8d397a6bd6e358f39f.png
Copied the url to your clipboard!