Hosted at playsthis.com.
I generate international Amazon links for products using a little Chrome Extension I wrote called Amazing Linkalizer.
- http://jekyllrb.com/
- http://www.smashingmagazine.com/2014/08/build-blog-jekyll-github-pages/
- https://github.com/barryclark/jekyll-now
-
On Windows:
-
On Mac/Linux:
-
Install Bundler (http://bundler.io/) -
gem install bundler
-
Install dependencies -
bundle install
-
Serve with
bundle exec jekyll serve
The tagging system is appreciatively stolen from MindDust.
When adding a new tag:
-
Add it to
_data/tags.yml
:- slug: drums name: Drums
-
Add a new empty template
tag/drums.md
with the front matter:--- layout: tag-page tag: drums permalink: /tag/drums/ ---
The repo contains a little node script to generate different sized images to be used in different places and at different screen sizes. When adding new images, do this:
- Add the original image to
images/
- Follow the naming convention
<firstname><surnameInital><number>
, e.g.timb1
. Where 1 is used as the lead image for thumbnails etc and other numbers are used throughout the post
- Follow the naming convention
- Make sure you've installed the node dependencies by running
npm install
- Run
npm run resize
In the post, add the name of the lead image (without extension) to the front matter, e.g. image: timb1
.
There's an html partial for showing images that sorts out the sizing etc. To insert an image use:
{% include articleImage.html image="timb1" alt="Tim Barclay" %}
In a few cases, for example if the original image is very small or very tall and thin, it's better to just use the original, in which case just use standard markdown image syntax.
Paths in Github pages are case sensitive and I, slightly short-sightedly, started off using title case for the paths of posts. This is bad as any number of blogs are more than willing to shout about, so I decided to switch to using all lower case from mid January 2016 onwards.
Github pages doesn't support server config files, like .htaccess
so to handle the existing posts, I added JekyllRedirectFrom to redirect lower case paths to the existing mixed case paths. In some ways it might have been better to change the existing paths to lower case and add redirects from the old mixed case versions but then anyone following an existing link would see an ugly redirect page for a second and I'd rather minimise how much that happens. Not to mention it would be a hassle to rename them all.
A basic related posts script appreciatively stolen from Andrea Fortuna.