https://github.com/cristianoliveira/liquid-pdf-live
A live preview of liquid templates for PDF
https://github.com/cristianoliveira/liquid-pdf-live
Last synced: 4 months ago
JSON representation
A live preview of liquid templates for PDF
- Host: GitHub
- URL: https://github.com/cristianoliveira/liquid-pdf-live
- Owner: cristianoliveira
- Created: 2025-05-08T16:35:56.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-06-09T05:49:18.000Z (4 months ago)
- Last Synced: 2025-06-09T06:29:39.716Z (4 months ago)
- Language: TypeScript
- Size: 2.76 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Liquid-PDF-live
## Introduction
This project is designed to generate PDF files using Liquid templates in live mode.
That means whenever the template file is modified, the server will automatically regenerate the PDF file and reload it in the browser.### TL;DR;
This app allows you to have the following workflow
> Liquid Templates > HTML > PDF > Live Comparison (live reload)
## Features
- Live reloading of PDF files
- Comparing HTML and PDF files side by side
- Liquid Template-based PDF generation
- Command-line interface for easy usage## Getting Started
### Prerequisites
- Node.js (v22.x or later)
- npm (Node Package Manager)
- A chrome-based browser (for live reloading and PDF generation)### Clone the Repository
To clone the repository, run the following command:
```bash
git clone https://github.com/cristianoliveira/liquid-pdf-live.git
```### Installing
To install the project dependencies, run:
```bash
npm install
```## Running the Server
To start the server, use the following command:
```bash
npm run start
```## Usage
This will launch the server, and you can access it at `http://localhost:3000?template=foobar`.
Once it is running, add the `templates/` like this `{foobar}.liquid` and `{foobar}.json` to start
generating PDFs. It **watches** for changes and automatically generates and reload the browser## CLI Usage
To generate a PDF on demand, use the following command:
```bash
npm run generate --
```Replace `` with the path to your Liquid template file.
## Project Structure
- `src/`: Contains the source code for the project.
- `template/`: Contains the template files and associated JSON data files.
- `dist/`: Output directory for generated PDF files.## Contributing
Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.
## License
This project is licensed under the MIT License.