Shopify / Shopify/liquid

Stack / Portal feature request

Open
#1,639 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
11.9k
Forks
1.5k
Avg merge
17h 55m
Merged PRs (30d)
3

Description

Imagine you have a section where you want to preload an image. You can't do this within the section, so you kinda have to duplicate some of the code into the theme.liquid file. (At least, this is the case for Shopify development)

Stack / Portal feature could potentially make this way easier:

layouts/theme.liquid

<head>
  {%- stack preloads -%}
</head>

<body>
  {%- section 'my-section' -%}
</body>

sections/my-section.liquid

<img src="my_image.png">

{%- push preloads -%}
  <link rel="preload" as="image" href="my_image.png">
{%- endpush -%}

The naming convention is taken from Laravel Blade.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the proposed examples in layouts/theme.liquid and sections/my-section.liquid, then trace how Liquid renders sections and layouts. Define the behavior for the stack and push tags, including ordering and scope, and consider how the feature should be tested; done means section content can contribute a preload link rendered in the layout head.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.