Skip to content

Instantly share code, notes, and snippets.

View benbrignell's full-sized avatar

Ben Brignell benbrignell

View GitHub Profile
@jeromecoupe
jeromecoupe / gulpfile.js
Last active May 13, 2025 15:54
responsive image pipeline in Gulp
"use strict";
// ---------------------------------------
// packages
// ---------------------------------------
const del = require("del");
const deleteEmpty = require("delete-empty");
const globby = require("globby");
const gulp = require("gulp");
@johnfmorton
johnfmorton / jekyll-collections-prev-next-wrap-around.html
Last active May 16, 2019 15:46 — forked from budparr/jekyll-collections-prev-next.html
Previous Next Links for Jekyll Collections - with wrap around to beginning link and last link when needed
{% capture the_collection %}{{page.collection}}{% endcapture %}
{% if page.collection %}
{% assign document = site[the_collection] %}
{% endif %}
<h1>TITLE: {{ page.title }}</h1>
{% for links in document %}
{% if forloop.first %}
{% assign first = links %}
{% endif %}
{% if forloop.last %}
@jonknapp
jonknapp / image_path_tag.rb
Created September 19, 2014 18:38
Jekyll plugin to return <img> markup by only passing in the image filename and optional alt text. Image path is "/images/:year/:slug/:filename".
module Jekyll
class ImagePathTag < Liquid::Tag
@alt = nil
@url = nil
IMAGE_URL = /((https?:\/\/|\/)?(\S+))/i
IMAGE_URL_WITH_ALT = /((https?:\/\/|\/)?(\S+))(\s+)"(.*?)"/i
def initialize(tag_name, markup, tokens)
super
@magicznyleszek
magicznyleszek / jekyll-and-liquid.md
Last active January 25, 2025 20:12
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes:

@andrewlaskey
andrewlaskey / vertical-rhythm.scss
Last active April 28, 2019 20:11
Vertical Rhythm Template for SASS projects
//Taken from: http://csswizardry.com/2012/02/pragmatic-practical-font-sizing-in-css/
/* Housekeeping */
*{ margin:0; padding:0; }
/* Define your base font-size here; most elements will inherit this. */
html{
font-size:1em; /* Assuming 16px... */
line-height:1.5; /* 24px (This is now our magic number; all subsequent margin-bottoms and line-heights want to be a multiple of this number in order to maintain vertical rhythm.) */
}
@kylefox
kylefox / gist:4512777
Created January 11, 2013 18:15
If you want to use Xcode's FileMerge as your git mergetool, this is how you set it up.
# Tell system when Xcode utilities live:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
# Set "opendiff" as the default mergetool globally:
git config --global merge.tool opendiff
@nicoleslaw
nicoleslaw / 1_Tiny_Content_Framework.md
Last active February 21, 2026 22:41
Tiny Content Framework

Tiny Content Framework

About the project

This is a tiny content strategy framework focused on goals, messages, and branding. This is not a checklist. Use what you need and scrap the rest. Rewrite it or add to it. These topics should help you get to the bottom of things with clients and other people you work with.

Give me feedback on Twitter (@nicoleslaw) or by email (nicole@nicolefenton.com).

Contents