Skip to content

Instantly share code, notes, and snippets.

View growdigital's full-sized avatar
🏠
Working from home

Jake Rayson growdigital

🏠
Working from home
View GitHub Profile
{
"Hugo figure": {
"prefix": "gofig",
"body": [
"{{< figure src=\"$1\" alt=\"$2\" caption=\"$3\" >}}",
"$4"
],
"description": "Hugo figure shortcode"
}
}
@growdigital
growdigital / markdown.json
Last active January 2, 2018 21:56
Groundwork Visual Studio Code User Snippets for post & status templates
{
// prettier-ignore
"Post template": {
"prefix": "fmp",
"body": [
"---",
"title: $1",
"excerpt: $2",
"datePublished: $3",
"image: $4",
@growdigital
growdigital / frontmatter.json
Last active October 2, 2017 15:39
Frontmatter Textastic template
{
"uuid": "3EA16C71-F1F2-4F51-9B91-CFEAA2A7D5B3",
"category": "Markdown",
"templates": [
{
"name": "Frontmatter",
"fileExtension": "md",
"snippet": "---\ntitle: ${1:untitled}\ndate: ${2:DATE}\nlayout: post.hbs\ncollections: posts\ndraft: true\ndesc: $3\n\n---\n\n"
}
]
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@growdigital
growdigital / toothpaste-colors.less
Created September 22, 2017 14:16
Toothpaste theme colors
// This file defines all the colours used in the Toothpaste theme.
// Gray
@gray: #C5C5C0;
// Blue-Grays
@blue-gray-light: #DAE3E8;
@blue-gray-dark: #465E68;
@blue-gray-darkest: #222E33;
@growdigital
growdigital / frontmatter.sublime-snippet
Created September 15, 2017 10:14
Sublime Text Frontmatter snippet for Metalsmith blog posts
<snippet>
<content><![CDATA[
---
title: $1
date: ${2:2017-04-01}
layout: post.hbs
collections: posts
draft: true
---
@growdigital
growdigital / html.html
Created July 13, 2017 14:22
All HTML elements. Well, most of them…
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTML by Adam Morse, mrmrs.cc</title>
</head>
<body>
<header>
<h1>HTML</h1>
@growdigital
growdigital / index.js
Created June 2, 2017 11:45
index.js of static-site test for metalsmith-rewrite
var Metalsmith = require('metalsmith');
var markdown = require('metalsmith-markdown');
var layouts = require('metalsmith-layouts');
var permalinks = require('metalsmith-permalinks');
var rewrite = require('metalsmith-rewrite');
Metalsmith(__dirname)
.metadata({
title: "My Static Site & Blog",
description: "It's about saying »Hello« to the World.",
@growdigital
growdigital / post.md
Created January 9, 2017 09:52 — forked from levibostian/post.md
webpack, Tachyons, pug, Vue.js web app.

Today, single page web apps are driving many websites that we use each and every day. Instead of having your browser request a new web page for each and every action you perform on a web page, single page web apps may load all in one request to smoothly and quickly transition with every action you perform.

When building single page web apps, you may decide to retrieve all of the HTML, CSS and Javascript with one single page load or dynamically load these resources as the user moves about your site. Either way, it can be a pain to bundle all of these assets together for the end user to download from your web server. This is where webpack comes into play.

webpack does all of the heavy lifting bundling all of your HTML, CSS and Javascript together. If you write your site all from scratch or depend on dependencies from npm, webpack takes care of packaging it all together for you. It has the ability to take your single page web app, cut out all of the code you don't need, then packa

@growdigital
growdigital / comma-first-var.js
Created November 22, 2016 20:55 — forked from isaacs/comma-first-var.js
A better coding convention for lists and object literals in JavaScript
// See comments below.
// This code sample and justification brought to you by
// Isaac Z. Schlueter, aka isaacs
// standard style
var a = "ape",
b = "bat",
c = "cat",
d = "dog",