Skip to content

Instantly share code, notes, and snippets.

View daviddarnes's full-sized avatar
🧱
he/him

David Darnes daviddarnes

🧱
he/him
View GitHub Profile
Liquid highlight with language type: {% hightlight html %}
<figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt">&lt;html&gt;</span>
<span class="nt">&lt;p&gt;</span>Hi world<span class="nt">&lt;/p&gt;</span>
<span class="nt">&lt;/html&gt;</span></code><button class="button--copy">Copy <span class="octicon octicon-clippy"></span></button></pre></figure>
Backticks with language type: ``` html
<div class="highlighter-rouge"><pre class="highlight"><code><span class="nt">&lt;html&gt;</span>
@daviddarnes
daviddarnes / rich-data-research.md
Last active March 17, 2016 17:09
I'm compiling a list of references on "rich data" or markup metadata, if you have something to add then please do in the comments below
@daviddarnes
daviddarnes / _config.yml
Last active April 7, 2016 14:52
Jekyll head meta
# Permalinks
permalink: pretty
# Posts
excerpt_separator: <!-- more -->
# Site info
url: "https://darn.es"
title: "David Darnes"
description: "Web Designer & Front-end Developer"
@daviddarnes
daviddarnes / BBC-Recipes-Archive-Proposal.md
Created May 17, 2016 11:16
BBC Recipes Archive Proposal

Steps to save the BBC Recipes Archive

  1. Setup an organisation on GitHub
  2. Create a repo called "theorgname".github.io
  3. Select a decent default Jekyll template
  4. Use this scraper? https://github.com/forbesg/bbc-good-food-recipe-scraper Or something similar to extract all the recipes (ideally in markdown)
  5. Upload the recipes to the repo, maybe under a new collection type
  6. See what we can do from there?
@daviddarnes
daviddarnes / schema-index-new.html
Last active May 19, 2016 08:14
Revised Jekyll SEO Tag JSON LD structure
<!-- Proposed Index json output -->
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"name": "Dave’s Blog",
"headline": "Dave’s Blog",
"image": "https://www.gravatar.com/avatar/6c0377abcf4da91cdd35dea4554b2a4c?s=600",
"description": "Articles, tutorials and other ramblings",
"publisher": {
@daviddarnes
daviddarnes / file-structure.md
Last active June 15, 2016 09:05
Jekyll theme file structure

root

  • garth-jekyll-theme.gemspec
  • _layouts
    • default.html
    • page.html
    • front.html
    • post.html
  • _includes
    • header.html
  • footer.html
@daviddarnes
daviddarnes / repeatify.js
Last active March 14, 2017 11:57
repeatify test
function repeatify(count) {
let newString = this;
for (var i = 1; i < count; i++) {
newString += this;
}
return newString;
}
String.prototype.repeatify = repeatify;
@daviddarnes
daviddarnes / pluralise.twig
Created October 31, 2017 13:11
Pluralising with Twig
{% spaceless %}
{% if integer > 1 %}
{{ plural }}
{% else %}
{{ singular }}
{% endif %}
{% endspaceless %}
@daviddarnes
daviddarnes / reading-list.md
Last active April 13, 2018 11:42
To read list