Skip to content

Instantly share code, notes, and snippets.

View ivanchromjak's full-sized avatar
🏠
Working from home

Ivan Chromjak ivanchromjak

🏠
Working from home
View GitHub Profile
{{ $imageSrc := .image | default "" }}
{{ $image := resources.Get $imageSrc }}
{{ if $image }}
{{ $alt := .alt | default $image.Title }}
{{ $loading := .loading | default "lazy" }}
{{ $class := .class | default "w-full" }}
{{ $sizes := .sizes | default "100vw" }}
{{ $itemprop := .itemprop | default "" }}
{{ if or (eq $image.MediaType.SubType "svg") (eq $image.MediaType.SubType "gif") }}
@ivanchromjak
ivanchromjak / cheatsheet-jekyll.md
Last active August 9, 2021 12:06 — forked from JJediny/gist:a466eed62cee30ad45e2
Jekyll Liquid Cheatsheet

There are two types of markup in Liquid: Output and Tag.

  • Output markup (which may resolve to text) is surrounded by
{{ matched pairs of curly brackets (ie, braces) }}
  • Tag markup (which cannot resolve to text) is surrounded by
@ivanchromjak
ivanchromjak / gravityview-trigger-gform_after_submission-form-20.php
Last active February 28, 2019 15:02 — forked from zackkatz/gravityview-trigger-gform_after_submission-form-12.php
GravityView - Trigger the `gform_after_submission` action when an entry is edited, but ONLY for Form #20.
<?php
/**
* GravityView doesn't trigger the `gform_after_submission` action when editing entries. This does that,
* but ONLY FOR FORM #20.
*
* @param array $form
* @param int $entry_id ID of the entry being updated
* @param GravityView_Edit_Entry_Render $object
*
@ivanchromjak
ivanchromjak / _config.yml
Last active November 24, 2022 03:53
Add PayPal donation button to Jekyll site
donations:
paypal:
text: Donate # Button text
id: 7334HG9754 # PayPal button ID
@ivanchromjak
ivanchromjak / package.json
Last active August 8, 2021 03:59
Jekyll npm build script, copies sass, js dependencies to assets directory and concatenates and minifies js files.
{
"name": "jekyll-theme-plus",
"version": "1.0.0",
"description": "Advanced Jekyll theme",
"repository": {
"type": "git",
"url": "https://github.com/ivanchromjak/jekyll-theme-plus.git"
},
"author": "Ivan Chromjak",
"license": "MIT",