Project

liquidbook

0.0
No release in over 3 years
There's a lot of open issues
A development tool that renders Shopify Liquid templates locally with mock data, providing a browser-based preview for sections and snippets.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 5.0
~> 3.9
~> 6.0
~> 2.0
~> 4.0
~> 1.3
 Project Readme

Liquidbook

CI

A Storybook-like local preview server for Shopify Liquid templates. Browse and preview your sections and snippets in the browser instantly.

Features

  • Auto-discovers .liquid files in sections/ and snippets/
  • Generates default setting values from {% schema %} blocks
  • Supports Shopify-compatible filters and tags (section, render)
  • Load external CSS/JS via .liquid-preview/config.yml
  • File watching with live reload

Installation

Add to your Gemfile:

gem "liquidbook"

Or install directly:

gem install liquidbook

Usage

Start the preview server

Run from your Shopify theme root:

liquidbook server

Open http://127.0.0.1:4567 in your browser to see a list of sections and snippets with live previews.

Options

Option Short Default Description
--port -p 4567 Port number
--host -H 127.0.0.1 Host to bind
--root -r . Theme root directory

Render a single template

liquidbook render sections/header.liquid

Outputs the rendered HTML to stdout.

Configuration

Create .liquid-preview/config.yml in your theme root to load external assets into the preview:

head:
  - <script src="https://cdn.tailwindcss.com"></script>
  - ../src/styles/main.css
  - ./src/components.js

port: 4567
host: 127.0.0.1

head entries accept raw HTML tags or file paths. File paths are resolved relative to the theme root.

Development

git clone https://github.com/sena-m09/liquidbook.git
cd liquidbook
bin/setup

See Release Process for how to publish a new version.

License

MIT License