Shopify / Shopify/liquid

Not support nested objects syntax.

Open
#1,718 4 comments 0 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

Hi, I am new to liquid template language. What I want to achieve is like the following code.

<img src={{ '/assets/images/{{entry.logo}}' | relative_url }} class="fas">

But jekyll build failed with some errors like Liquid Exception: Liquid syntax error (/app/src/_includes/docs/app-figure.md line 22): Unexpected character ' in "{{ '/assets/images/docs/{{path}}". Should I rewrite the code using belows? Is there any simple solution for no assign a new variable?

{% assign entry_logo = '/assets/images/{{entry.logo}}' -%}
<img src={{ entry_logo | relative_url }} class="fas">

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 by reproducing the Jekyll build error in _includes/docs/app-figure.md at line 22 and reviewing how the shown nested Liquid expressions are parsed. The work is done when the requested nested-object syntax has defined behavior and the equivalent image expression builds successfully without requiring the intermediate assign.

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
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.