Skip to content

Instantly share code, notes, and snippets.

View dirtystylus's full-sized avatar

Mark Llobrera dirtystylus

View GitHub Profile
@dirtystylus
dirtystylus / claude-eleventy-image-optimization.md
Last active May 11, 2026 15:46
Claude Eleventy Image Optimization

Eleventy Build Optimization Chat Transcript


Mark: Does Netlify support incremental builds for an Eleventy site?

Claude: Incremental builds for Eleventy on Netlify depend on how you configure them—Netlify doesn't automatically enable incremental building for Eleventy sites the way it does for some other frameworks.

Here's the current landscape:

const markdownIt = require("markdown-it");
const md = new markdownIt();
const dbg = require("debug")("responsiver-config");
const runAfterHook = (image, document) => {
let imageUrl =
image.getAttribute("data-pristine") || image.getAttribute("src");
let caption = image.getAttribute("title");
if (caption !== null) {
caption = md.renderInline(caption.trim());

Gods of Jade and Shadow

  • by Silvia Moreno-Garcia
  • Started 2019/01/02
  • Finished 2019/01/08
  • Is this YA? Does it matter? I enjoyed this, and I like that it didn’t end in an easy cliché.

what is yours is not yours

  • by Helen Oyeyemi
@dirtystylus
dirtystylus / eleventy-figure-shortcode.md
Last active January 3, 2023 13:33
Eleventy Figure Shortcode
module.exports = (image, caption, className) => {
  const classMarkup = className ? ` class="${className}"` : '';
  const captionMarkup = caption ? `<figcaption>${caption}</figcaption>` : '';
  return `<figure${classMarkup}><img src="/img/${image}" />${captionMarkup}</figure>`;
  // the line below does all this in one line, but is more confusing:
  // return `<figure${className ? ` class="${className}"` : ''}><img src="/img/${image}" />${caption ? `<figcaption>${caption}</figcaption>` : ''}</figure>`;
};
@dirtystylus
dirtystylus / reading-log-2019.md
Last active November 19, 2019 21:48
Reading Log 2019

China Rich Girlfriend

  • by Kevin Kwan
  • Started 2019/01/02
  • Finished 2019/01/08

Good and Mad

  • by Rebecca Traister
  • Started 2019/01/02
  • The Underground Railroad, Colson Whitehead
  • Moonglow, Michael Chabon
  • Gnomon, Nick Harkaway
  • Death of a King, Tavis Smiley
  • The Obelisk Gate, N. K. Jemisin
  • New York 2140, Kim Stanley Robinson
  • My Brilliant Friend, Elena Ferrante
  • The Woman Who Smashed Codes, Jason Fagone
  • So You Want to Talk About Race, Ijeoma Oluo
  • Her Body and Other Parties, Carmen Maria Machado
@dirtystylus
dirtystylus / hook-presave-delete.module
Created April 5, 2017 12:24
Hook Presave and Delete
<?php
/**
* @file
* Field DOS Feed Status Module file
*
* This module allows site administrators to send a stock warning
* email to a specified user or users through the admin interface.
* Administrators can configure the default email including token replacement.
*/
//define('EXHIBIT_ITEMS_MODIFICATION_DATE', 'none');
@dirtystylus
dirtystylus / vs-code-key-bindings.json
Last active February 20, 2017 20:39
VS Code Key Bindings
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "shift+alt+down", "command": "cursorColumnSelectDown", "when": "editorTextFocus" },
{ "key": "shift+alt+up", "command": "cursorColumnSelectUp", "when": "editorTextFocus" },
{ "key": "cmd+l", "command": "workbench.action.gotoLine" },
{ "key": "shift+ctrl+d", "command": "editor.action.copyLinesDownAction", "when": "editorTextFocus && !editorReadonly" },
{ "key": "ctrl+cmd+down", "command": "editor.action.moveLinesDownAction", "when": "editorTextFocus && !editorReadonly" },
{ "key": "ctrl+cmd+up", "command": "editor.action.moveLinesUpAction", "when": "editorTextFocus && !editorReadonly" },
{ "key": "shift+cmd+[", "command": "workbench.action.previousEditor" },
{ "key": "shift+cmd+]", "command": "workbench.action.nextEditor" },
/* Modular Scale */
$ms-base: 1.125em;
$ms-ratio: $golden;
$ms-range:
1.05 20em,
1.33 81.25em;
.entry-meta {
@include ms-respond(font-size, -1);
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "github"]
url = GITHUB REMOTE REPO URL HERE
fetch = +refs/heads/*:refs/remotes/github/*