Search by

phpmystic / pillar

phpmystic

A local-first static site generator built on Liqx: markdown and liqx templates in, plain HTML out, with a schema-driven visual editor and git as the store.

Package info

github.com/mehdilight/pillar

Language:TypeScript

pkg:composer/phpmystic/pillar

Statistics

Installs: 7

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.2.0 2026-09-12 22:55 UTC

This package is auto-updated.

Last update: 2026-09-13 11:55:05 UTC


README

A local-first static site generator with a schema-driven visual editor.

Pillar turns Markdown content and Liqx templates into static HTML. Its dashboard lets you manage content, arrange page sections, and preview changes while keeping your site in ordinary files you can version with Git. Use it for blogs, documentation, landing pages, portfolios, and other content-driven sites.

No database or hosted account is required. The generated site can be served by any static host.

Get started · Documentation · Contributing

Features

  • Visual editing: arrange sections and blocks, edit their settings, and preview pages through the same renderer used for builds.
  • Structured content: define collections with 29 field types, relationships, validation rules, and conditional fields. Entries use Markdown with frontmatter.
  • Schema-driven controls: a template's <schema> block defines both its Liqx prop contract and its editor controls.
  • Themes and addons: reuse layouts, sections, and snippets through a layer cascade, with site-level overrides.
  • Media and navigation: manage uploads, image alt text, and nested navigation menus. Generate resized images at build time.
  • Git publishing: save changes to disk, review them, and commit from the dashboard, with optional pushing to a remote.
  • Incremental builds: rebuild changed pages and generate static output with content-hashed assets.
  • Extensible plugins: add settings, editor panels, template extensions, routes, and build hooks. The included SEO plugin provides metadata, structured data, sitemaps, and robots output.
  • English and French interfaces: switch languages in the dashboard or visual editor without losing unsaved edits.

Project status

Pillar is under active development. The renderer, dashboard, visual editor, validation, Git integration, and SEO plugin are implemented. APIs and file formats may evolve.

Composer plugin discovery, plugin lifecycle commands, feed/search plugins, and deployment adapters are planned.

Requirements

  • PHP 8.2+ with mbstring and json.
  • Composer 2 for PHP dependencies.
  • Node.js 22+ and npm to build the dashboard and bundled plugin interfaces from this checkout.
  • Git to clone the repositories and use publishing features.

PHP's gd extension enables image resizing; exif enables photo orientation correction. Without gd, images are served at their original size. Node.js is needed for dashboard development and compilation, not for serving the generated site.

Quick start

1. Install with Composer

Composer downloads Pillar and its dependencies from packages listed on Packagist. Once phpmystic/pillar is indexed, install the initial release:

composer create-project phpmystic/pillar my-site "^0.1"
cd my-site
npm --prefix apps/editor ci
npm --prefix apps/editor run build

This creates a copy of the full Pillar package. The example site lives in examples/starter/; the dashboard and bundled plugin interfaces currently require a local Node.js build. There is no pillar init command yet.

See Installation for Git installation and troubleshooting, or Creating your own site to keep your content in a separate project.

2. Open the starter site

From the Pillar repository root:

./bin/pillar dev --site examples/starter

Open http://127.0.0.1:7788 for the dashboard. Choose Customize to open the visual editor, or visit http://127.0.0.1:7788/preview/ to view the site.

The starter includes a landing page, blog, and documentation section. Edit an entry or change a section setting, save, and inspect the resulting files with git diff. Edits in this example modify the checkout's examples/starter/ directory.

3. Validate and build

./bin/pillar check --site examples/starter
./bin/pillar build --site examples/starter

The generated site is written to examples/starter/dist/. Preview the production output locally:

php -S 127.0.0.1:8080 -t examples/starter/dist

Set base_url in your site's site.json before deploying. Upload the contents of the output directory to your static host. Draft entries are excluded from production builds by default.

How it works

A Pillar site is a directory containing configuration, templates, content, and assets. Liqx renders the templates; Pillar supplies content, resolves theme layers, and builds the routes.

my-site/
├── site.json                  # Site configuration, addons, and plugins
├── layout/theme.liqx          # Page shell
├── templates/*.json           # Page section composition
├── sections/*.liqx            # Section markup and schema
├── snippets/*.liqx            # Reusable template components
├── config/settings_schema.json
├── config/settings_data.json  # Theme setting values
├── config/plugins/*.json      # Plugin settings
├── data/menus.json            # Navigation menus
├── schemas/*.json             # Content models
├── content/<collection>/*.md   # Markdown entries with frontmatter
└── assets/                    # Stylesheets, images, fonts, and uploads

Saving in the dashboard writes files to disk. Publishing records changes in Git and can push them to a configured remote. Building generates the static site; deployment is a separate step. Sites without their own Git repository can still be edited, previewed, and built.

For an independent project, copy the starter into a separate directory and initialize its own Git repository. See the project structure, site configuration, and publishing guide for details.

CLI

Run commands from this checkout using ./bin/pillar. Every command accepts --site <directory>; the default is the current directory.

Command Purpose
dev Start the dashboard and live preview; default port is 7788.
build Generate the static site; use --force to rebuild everything or --drafts to include drafts.
check Validate schemas, templates, and content.
make:collection <name> Scaffold a content model, content directory, and template.
why <path> Show which layer supplies a file and which versions it overrides.
./bin/pillar dev --site examples/starter --port 7790
./bin/pillar why sections/hero.liqx --site examples/starter
./bin/pillar build --help

Documentation

Start with the documentation index, or choose a setup guide:

The documentation is itself a Pillar site in website/, using the starter as an addon. Run it locally:

./bin/pillar dev --site website --port 7790

Open http://127.0.0.1:7790/preview/docs/introduction/ to read it, or browse the source guides:

Topic Guides
Getting started Introduction, How it works
Content Collections and entries, Content types, Media library
Templates and design Liqx templates, Schema blocks, Themes and addons
Publishing Building, Git publishing, Deploying
Extensions Plugins, SEO plugin
Internals Backend architecture, Dashboard development, HTTP API

Interface language

Choose English or Français in either header. The preference is remembered across screens and tabs. On the first visit, Pillar follows a supported browser language, with English as the fallback. Switching the interface language preserves site content and unsaved edits.

Translations use i18next. See the translation guide to add or update messages, including plugin translations.

Contributing

Bug reports, documentation improvements, and focused pull requests are welcome. For bugs, include reproduction steps, expected and actual behavior, relevant error output, and your PHP and Node.js versions. Discuss substantial changes in an issue before starting implementation.

See the development guide for repository layout, frontend development, tests, and generated field types.

Template language reference

Start with Liqx templates or the complete pagination recipe.

License

Pillar is licensed under the MIT License.