Add layout and template-inheritance support
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 354
- Forks
- 72
- PR merge metrics
- No merged PRs in 30d
Description
Goal
Support a focused template-inheritance mechanism for a child template to select a parent layout and provide content for one or more named slots.
Example direction:
{% layout "parent.tpl" %}
{% block content %}<h1>Hello</h1>{% endblock %}
<html>
<body>{% slot content %}Default content{% endslot %}</body>
</html>
The final syntax should be chosen against an established implementation such as LiquidJS or Jekyll and documented as an extension when it is not part of Shopify Liquid.
Acceptance criteria
- Define the compatibility target and exact syntax before implementation.
- Support a default body and at least one named block/slot.
- Resolve layouts through
TemplateStoreand the same path rules as other template-loading tags. - Define variable scope between child and parent templates.
- Detect missing layouts, duplicate blocks, and inheritance cycles with source-located errors.
- Include focused tests and user-facing documentation.
Pull request guidance
Implement this as a focused change. PR #145 combines layout support with many unrelated compatibility, audit, sandboxing, and API changes and is not a mergeable implementation path for this issue in its current form.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin by comparing the proposed layout, block, and slot syntax with LiquidJS or Jekyll, then trace TemplateStore and the existing template-loading tags for path and scope behavior. Define the compatibility target before implementation; done includes focused tests, source-located errors for missing layouts, duplicate blocks, and cycles, plus user-facing documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100