slendium/slendium-static

Static website generator.

Maintainers

Package info

github.com/slendium/slendium-static

pkg:composer/slendium/slendium-static

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-03-13 05:01 UTC

This package is auto-updated.

Last update: 2026-03-23 19:42:43 UTC


README

Static website generator.

Installation

Requires PHP >= 8.5, Composer and npm. Simply run composer install slendium/slendium-static to add it to your project.

Usage

Create a content/ directory and a slendium-static.php configuration file in the root of your project. Each file in the content/ directory corresponds to a page of the generated site. Pages can be created using either HTML or Markdown. Running the script at vendor/bin/generate-site will generate the site in the public/ directory.

Examples

Default configuration file

The configuration file lives at slendium-static.php in the root directory of your project. It should return an ArrayAccess|array where each key is a configuration name. Use the ConfigsBuilder for type-safe configuration, as in the example below.

return new ConfigsBuilder()
	->setTitleTemplate(static fn($localTitle) => "$localTitle - My Website")
	->setBaseSectionProvider(new ArraySectionProvider([
		SectionNames::HEADER => new HtmlSection('Enter your header-HTML here'),
		SectionNames::FOOTER => new HtmlSection('Enter your footer-HTML here'),
	]))
	->build();

Roadmap

  1. [Done] Static pages based on HTML or Markdown only
  2. [Done] Include a global stylesheet
  3. Integrate compositor library
  4. Support for multi-locale sites
  5. Page generation (for pagination of blogs, product pages, or similar)
  6. Integrate JS/CSS minification strategies
  7. Auto-optimized images with support for cropping based on screen size
  8. Validating site integrity by checking all internal links