Skip to content

Instantly share code, notes, and snippets.

View danfascia's full-sized avatar
🎲
Dabbling

danfascia

🎲
Dabbling
View GitHub Profile
@daviddarnes
daviddarnes / .eleventy.js
Last active February 14, 2022 02:10
Compile JavaScript and Sass in Eleventy using UglifyJS and Sass lib
const terser = require("terser");
const sass = require("sass");
module.exports = (eleventyConfig) => {
// Compile Sass
eleventyConfig.addTemplateFormats("scss");
eleventyConfig.addExtension("scss", {
outputFileExtension: "css",
compile: function (contents, inputPath) {
@freshyill
freshyill / .eleventy.js
Last active April 23, 2021 17:13
Vimeo Editor Component for Netlify CMS
module.exports = function(eleventyConfig) { // This only happens once in your template!
// Blah blah, whatever other Eleventy stuff you need.
eleventyConfig.addLiquidShortcode("vimeo", (vimeoId, aspectRatio) => {
return `<div class="aspect-ratio" style="--aspect-ratio: ${aspectRatio}"><iframe src="https://player.vimeo.com/video/${vimeoId}" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen class="video video--vimeo"></iframe></div>`;
});
// Blah blah, whatever other Eleventy stuff you need.
@jonathan-soifer
jonathan-soifer / index.html
Last active January 10, 2019 22:13
Very basic boilerplate Index.html for Hugo Static Website Generator
<!-- Doctype HTML5 -->
<!DOCTYPE html>
<html lang="en" />
<head>
<!-- Set character encoding for the document -->
<meta charset="UTF-8" />
<!-- Instruct Internet Explorer to use its latest rendering engine -->
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<!-- Viewport for responsive web design -->
@micc83
micc83 / skip-to-check-out.php
Last active April 11, 2024 00:13
Skip cart and redirect to direct checkout on WooCommerce
<?php
/**
* Skip cart and redirect to direct checkout
*
* @package WooCommerce
* @version 1.0.0
* @author Alessandro Benoit
*/
// Skip the cart and redirect to check out url when clicking on Add to cart
@mixonic
mixonic / .gitignore
Created May 16, 2011 18:55
Mousy - A shared cursor for webpages using Node.js
node_modules
public/socket.io.min.js
public/jquery.js