Installation
gem install rmagick # you'll need ImageMagick & Ruby first
gem install colormath
gem install micro-optparse
| <script type="text/javascript"> | |
| /* Works for me */ | |
| var text_posts = document.getElementsByClassName("regular"); | |
| var text_404 = "The URL you requested could not be found."; | |
| var title_404 = "Not Found"; | |
| if(text_posts.length == 1){ | |
| var bodyNode = text_posts[0].lastChild; | |
| if(bodyNode.previousSibling.textContent == text_404) { | |
| // titleNode.innerHTML = "<a href='/'>Not Found</a>"; | |
| var blog_loc = "http://" + document.domain + "/"; |
| require 'rubygems' | |
| require 'sinatra' | |
| require 'pony' | |
| require 'haml' | |
| set :haml, {:format => :html5} | |
| set :public, File.dirname(__FILE__) | |
| set :views, File.dirname(__FILE__) | |
| # Create the page class and give it a title of Contact for the layout |
| <!-- | |
| A quick fix for my friend Chris Bowler. | |
| http://chrisbowler.com/journal/alternate-css-files | |
| --> | |
| <link rel="stylesheet" media="screen" id="time_style" href="/-/css/day.css" /> | |
| <script> |
| /* Preview hover styles */ | |
| #theme_list ul li { | |
| position:relative; | |
| } | |
| .product-preview{ | |
| position:absolute; | |
| left:100%; | |
| top:-1px; | |
| margin-left:1px; | |
| background:#222; |
| # | |
| # Jekyll Dev Only Tag | |
| # | |
| # Author : Colin Kennedy | |
| # Usage : | |
| # | |
| # The markup/script/css included within the `devonly` tags | |
| # is included in the rendered page when either: | |
| # | |
| # * `server` mode is used |
| language: ruby | |
| rvm: | |
| - 1.9.3 | |
| script: rake generate | |
| after_success: bash post_build.sh |
| module Jekyll | |
| module Generators | |
| class Pagination | |
| # Monkey patch this method to exclude some cats and tags from all standard | |
| # paginators | |
| # | |
| # For this to take effect, you have to define a ``exclude_home`` property in your _config.yml: | |
| # | |
| # exclude_home: | |
| # categories: [notes] |
| ## | |
| # The MIT License (MIT) | |
| # | |
| # Copyright (c) 2014 Ryan Morrissey | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is |
| extension Array { | |
| func first() -> Element? { | |
| if isEmpty { | |
| return nil | |
| } | |
| return self[0] | |
| } | |
| func last() -> Element? { |