This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { PurgeCSS } = require('purgecss'); | |
/** | |
* Remove any CSS not used on the page and inline the remaining CSS in the | |
* <head>. | |
* | |
* @see {@link https://github.com/FullHuman/purgecss} | |
*/ | |
eleventyConfig.addTransform('purge-and-inline-css', async (content, outputPath) => { | |
if (process.env.ELEVENTY_ENV !== 'production' || !outputPath.endsWith('.html')) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- git clone https://github.com/tailwindlabs/tailwindcss.com | |
- cd tailwindcss.com | |
- yarn | |
- yarn export (this will take a while to run) | |
- cd out | |
- python -m SimpleHTTPServer(this fires up webserver at localhost:8000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fg = require('fast-glob'); | |
const sharp = require('sharp'); | |
const headers = fg.sync(['src/posts/**/header.jpg']); | |
headers.forEach(header => { | |
thumb = header.replace("src/posts", "_site/news").replace("header", "thumb"); | |
sharp(header) | |
.jpeg({ | |
quality: 50, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am huphtur on github. | |
* I am huphtur (https://keybase.io/huphtur) on keybase. | |
* I have a public key whose fingerprint is 7E6E 1929 F48B 44C0 0E62 0CFE 4359 820F 54C0 47F4 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: function gqv(v) { | |
var q = window.location.search.substring(1); | |
var vars = q.split("&"); | |
for (var i = 0; i < vars.length; i++) { | |
var pair = vars[i].split("="); | |
if (pair[0] == v) { | |
return pair[1]; | |
} | |
} | |
return (false); |