Skip to content

A spec for "Liquid Components" #226

@jaredcwhite

Description

@jaredcwhite

Good morning! I posted this over at the Shopify/liquid GH repo and thought you might be interested here as well…trying to get some community feedback.


Hi everybody! A proof-of-concept implementation of what I'm calling the "Liquid Components" spec has just landed in the Bridgetown project.

PR: bridgetownrb/bridgetown#26

Demo: https://deploy-preview-26--bridgetownrb.netlify.app/components/

Preliminary spec: https://github.com/bridgetownrb/liquid-component


Essentially, the idea is that a Liquid template used by the render tag can contain YAML front matter at the top, which gets stripped out in our implementation of the File System.

That front matter then can be used by a tool that loops through all the templates and pulls out that metadata for use in building a "Storybook" style UI that documents the components. We also have sidecar "preview" files that are simply HTML to render out components as examples, and it's even possible to use per-component stylesheet partials as part of the Webpack build.

I'd love your feedback and further ideas of what this could do for the Liquid ecosystem and the ways in which templates and the render tag (along with our custom rendercontent block tag that processes HTML/Markdown body content) could be used to create pretty sophisticated design systems.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions