3.4 KiB
About the PHP Version of Pattern Lab
The PHP version of Pattern Lab is, at its core, a static site generator. It combines platform-agnostic assets, like the Mustache-based patterns and the JavaScript-based viewer, with a PHP-based "builder" that transforms and dynamically builds the Pattern Lab site. By making it a static site generator, the PHP version of Pattern Lab strongly separates patterns, data, and presentation from build logic. The PHP version should be seen as a reference for other developers to improve upon as they build their own Pattern Lab Builders in their language of choice.
Getting Started
The PHP version of Pattern Lab should be relatively easy for anyone to get up and running.
- Requirements
- Installing the PHP Version of Pattern Lab
- Generating the Pattern Lab Website for the First Time
- Setting Up Apache to use the Advanced Features
- Using the Command-line Options
Working with Patterns
Patterns are the core element of Pattern Lab. Understanding how they work is the key to getting the most out of the system. Patterns use Mustache so please read Mustache's docs as well.
- How Patterns Are Organized
- Adding New Patterns
- Reorganizing Patterns
- "Hiding" Patterns in the Navigation
- Including One Pattern Within Another
- Managing the Images and JavaScript for a Pattern
- Modifying the Styles for a Pattern
- Creating & Working With Dynamic Data for a Pattern
- Modifying the Standard Header & Footer for Patterns
Using the Advanced Features
By default, the Pattern Lab assets can be manually generated and the Pattern Lab site manually refreshed but who wants to waste time doing that? Here are some ways that the PHP version of Pattern Lab can make your development workflow a little smoother: