定制 slendium/slendium-static 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

slendium/slendium-static

最新稳定版本:v0.2.0

Composer 安装命令:

composer require slendium/slendium-static

包简介

Static website generator.

README 文档

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

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固