PHPSSG is a lightweight static site generator that leverages vanilla PHP and automated dependency injection for an easy and efficient development experience. With plain PHP templates and invokable components, creating composable layouts and deploying static pages is seamless and straightforward. Ideal for developers seeking simplicity and portability.
PHPSSG (Personal Home Page Static Site Generator) is a lightweight static site generator that enables developers to create composable templates using pure PHP. This project leverages invokable component classes and output buffering to ensure a clean and intuitive developer experience without requiring any third-party templating engines.
$header(), enhancing simplicity in template usage.ob_start() and ob_get_clean().Layout containing a Header alongside content).The project is organized in a way that promotes clarity and maintainability:
config/: Contains bootstrap and setup code including autoloaders.public/: The web-facing build directory contains HTML entry points and static assets, keeping PHP source code secure.scripts/: Contains development and build scripts to streamline workflows.contracts/: Defines shared behaviors across application components, facilitating clear interactions and easier documentation.presenters/: Contains PHP classes that act as invokable components, responsible for rendering logic.components/: Reusable UI building blocks, each comprising a presenter and its corresponding view.layouts/: Reusable page skeletons that define the overall structure of pages.pages/: Includes page-level presenters that assemble components and layouts into complete pages.utilities/: Features small helper classes that manage repetitive tasks such as rendering.views/: Contains raw PHP templates organized by their associated presenters, strictly displaying content without business logic.This organization promotes:
public/ directory ensuring only necessary files are exposed.Contributions are encouraged, whether they involve bug fixes, performance improvements, or new feature suggestions. When contributing, adhere to the following principles:
presenters/ for logic, views/ for templates, and utilities/ for shared helpers.Renderable and Composable interfaces to help define components and their expected behavior.No comments yet.
Sign in to be the first to comment.