Skip to content

Instantly share code, notes, and snippets.

View kennethormandy's full-sized avatar

Kenneth Ormandy kennethormandy

View GitHub Profile
@kennethormandy
kennethormandy / thing.jade
Last active September 26, 2015 19:55 — forked from quitequinn/thing.jade
Redefine variable
- var OPT = false
each opt in data.OPT
if (typeof(opt) !== 'undefined')
if (typeof(opt.displayText) !== 'undefined')
- OPT = true
if (OPT == true)
include ../partials/opt
//<![CDATA[
WebFontConfig = {
google: {
families: ['Roboto+Slab:400,700:latin']
},
typekit: {
id: 'kax3zci'
},
monotype: {
projectId: '0d4aee2f-16cb-4cc3-9186-1e2317d930ab'
@kennethormandy
kennethormandy / _data.json
Last active December 28, 2015 22:49
hb-snippet-sort-by-date
{
"go-out-and-make-it-your-own": {
"title": "Go Out & Make It Your Own",
"date": "2013-08-19"
},
"an-out-of-order-article": {
"title": "An out-of-order article",
"date": "2014-11-01"
},
"welcome-to-harp": {

Adding a CSS framework to a Harp app with npm

Let’s create an example app that installs Fluidity from npm.

  1. Create an example app.
cd ~/Desktop
harp init example
cd example
@kennethormandy
kennethormandy / _article-drafts.jade
Last active December 24, 2015 17:19
A snippet for Harp. This is my first pass at showing draft posts locally but not in production.
p “The environment is #{ environment }.”
ul
each article, slug in public.data
unless article.published===false && environment=="Production"
li
a(href="/articles/#{ slug }") #{ article.title }
//- Now, running the server locally will show
A Simple Blog and A Simple Article, but in
@kennethormandy
kennethormandy / hb-snippet-variable-example.md
Last active February 26, 2019 16:57
A quick example Harp app that uses the correct title for your blog in the correct place.

A quick example Harp app that uses the correct title for your blog in the correct place.

The App

app/
  |- _harp.json
  |- _layout.ejs
  |- index.ejs
  |+ posts/
      |- _data.json
@kennethormandy
kennethormandy / _hb-snippet-md-blockquote.less
Last active December 22, 2015 18:48
When I write Markdown with Harp, this is how I style the blockquote. You can use it as a LESS or Stylus partial if you’d like.
/* Blockquotes
Corresponding Markdown is:
> This is the blockquote
> **Author [Source](http://example.com/article.html)**
Replace the variables with your own.
*/