Skip to content

Instantly share code, notes, and snippets.

View patrickbolle's full-sized avatar

Patrick Bollenbach patrickbolle

View GitHub Profile
@patrickbolle
patrickbolle / recipekit-list.liquid
Last active November 17, 2026 18:54
RecipeKit Recipe List manual install snippet (auto-synced)
<!-- hi --!>
@patrickbolle
patrickbolle / recipekit-filter.liquid
Last active November 17, 2026 18:54
RecipeKit Filter manual install snippet (auto-synced)
{% comment %}RecipeKit Filter Widget v1.4.0{% endcomment %}
{%- comment -%}
Manual install of the Recipe Kit Filter, for themes where the app block can't sit where the filter
belongs: a page built as one big section, a vintage .liquid template, or a template that isn't a blog.
Save this file as snippets/recipekit-filter.liquid and render it where the filter should appear:
{% render 'recipekit-filter', blog_handle: 'recipes', filter_1_name: 'Diet', filter_1_tags: 'Vegan, Gluten free', enable_search: true %}
Each parameter is optional and named after the app block setting it stands in for.
blog_handle The blog to filter. Defaults to the blog of the page being viewed. On any
@patrickbolle
patrickbolle / mo-recipekit.liquid
Last active November 17, 2026 18:54
RecipeKit Metaobject liquid widget (auto-synced)
{% comment %}RecipeKit Metaobject Liquid Widget v0.2.0{% endcomment %}
{%- assign rk_resource_id = article.id | downcase -%}
{%- assign rk_type = article.metafields.recipekit[rk_resource_id].type -%}
{% if rk_type == 'json' %}
{%- assign rk_mf = article.metafields.recipekit[rk_resource_id].value -%}
{% else %}
{%- assign rk_mf = article.metafields.recipekit[rk_resource_id] -%}
{% endif %}
{%- assign rk_settings = shop.metafields.recipekit.settings -%}
{%- if rk_mf != blank -%}
@patrickbolle
patrickbolle / recipekit-svelte.liquid
Last active November 17, 2026 18:54
RecipeKit Svelte widget manual install snippet (auto-synced)
{% comment %}RecipeKit Svelte Widget v1.23.0{% endcomment %}
{%- assign rk_settings = shop.metafields.recipekit.settings -%}
{%- if rk_settings.settings.default_heading_type == 'h2' -%}{%- assign rk_heading_tag = 'h2' -%}{%- else -%}{%- assign rk_heading_tag = 'h1' -%}{%- endif -%}
{%- assign rk_lang = shop.metafields.recipekit.rk_lang -%}
{%- comment -%}Same token the app block passes. With it the widget reads the recipe and its labels from the metaobjects in the visitor's language, so a translation app's work shows here too. Without it the labels stay in the shop's own language.{%- endcomment -%}
{%- assign rk_storefront_token = shop.metafields.recipekit.storefront_token -%}
{%- assign rk_recipe_id = blank -%}
{%- assign rk_mf = blank -%}
{%- comment -%}A recipe hangs off an article or a store page: same metafield, keyed by the resource id. Pages have no author or publish date, so the JSON-LD falls back to the shop and to the recipe's own date.{%- endcomment -%}
{%- if article -%}{%- assign rk
@patrickbolle
patrickbolle / filter.css
Last active September 17, 2024 16:14
filter.js
#rk_filter {
display: none; /* hide filter by default */
flex-wrap: wrap;
justify-content: center;
margin: 20px 0;
}
#rk_filter select {
margin: 0 5px;
padding: 10px 15px;
@patrickbolle
patrickbolle / bbcomments.css
Last active October 28, 2026 19:46
Better Blog Comments widget script (auto-synced)
/* Better Blog Comments Widget CSS v1.5.1 */
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert:
{% comment %}
Wait.li Logic File
DO NOT TOUCH THIS FILE.
{% endcomment %}
{% assign og_wait_li_product_id = product.id | downcase %}
{% assign new_wait_li_product_id = product.selected_or_first_available_variant.id | downcase %}
{% assign og_wait_li_product_metafield = product.metafields.wait_li[og_wait_li_product_id] %}
{% assign new_wait_li_product_metafield = product.selected_or_first_available_variant.metafields.wait_li[new_wait_li_product_id] %}
{% if og_wait_li_product_metafield %}
@patrickbolle
patrickbolle / rk.css
Last active November 17, 2026 18:54
RecipeKit theme styles (auto-synced)
/* RecipeKit Liquid Widget CSS v2.0.3 */
@charset "UTF-8";
/* Base SCSS Variables */
/* End SCSS Variables */
/* Media Queries for SCSS */
/* End Media Queries */
/* Debut Theme Overrides */
.rte .social-sharing {
margin: 0;
list-style: none;
{%- liquid
assign og_wait_li_product_id = product.id | downcase
assign og_wait_li_product_metafield = product.metafields.wait_li[og_wait_li_product_id]
assign new_wait_li_product_id = product.selected_or_first_available_variant.id | downcase
assign new_wait_li_product_metafield = product.selected_or_first_available_variant.metafields.wait_li[new_wait_li_product_id]
if og_wait_li_product_metafield
assign wait_li_product_metafield = og_wait_li_product_metafield
assign wait_li_product_id = og_wait_li_product_id
else
assign wait_li_product_metafield = new_wait_li_product_metafield
@patrickbolle
patrickbolle / rk.liquid
Last active November 17, 2026 18:54
RecipeKit theme snippet (auto-synced)
{% comment %}RecipeKit Liquid Widget v2.1.2{% endcomment %}
{%- assign rk_resource_id = article.id | downcase -%}
{%- assign rk_type = article.metafields.recipekit[rk_resource_id].type -%}
{% if rk_type == 'json' %}
{%- assign rk_mf = article.metafields.recipekit[rk_resource_id].value -%}
{% else %}
{%- assign rk_mf = article.metafields.recipekit[rk_resource_id] -%}
{% endif %}
{%- assign rk_settings = shop.metafields.recipekit.settings -%}
{%- if rk_mf != blank -%}