Skip to content

Instantly share code, notes, and snippets.

View allanwhite's full-sized avatar

Allan White allanwhite

View GitHub Profile
@allanwhite
allanwhite / image_helpers.rb
Last active December 7, 2017 16:53 — forked from raybrownco/image_helpers.rb
Inline SVG in Middleman
# Middleman - Inline SVG Helper
# ------------------------------------------------------------------------------
# 1. Save this file at `[project_root]/helpers/image_helpers.rb`
# 2. Restart your local Middleman server if it's running
# 3. Embed SVG files into your template files like so:
#
# <%= inline_svg("logo"); %> assuming logo.svg is stored at source/assets/icons/inlined/logo.svg
#
# The helper also allows for CSS classes to be added:
#