此包已被 弃用 且不再维护。未建议替代包。

PHP 静态网站生成器

资助包维护!
JoshuaEstes

安装: 7

依赖: 0

建议者: 0

安全: 0

星标: 1

关注者: 3

分支: 0

开放问题: 0

类型:项目

dev-master / 0.1.x-dev 2020-06-03 19:41 UTC

This package is auto-updated.

Last update: 2023-11-15 04:56:18 UTC


README

PHP 静态网站生成器

安装

composer global require "joshuaestes/thoth:dev-master"

入门指南

配置

通过 .thoth.{yaml|yml} 和 .env{.local} 文件进行配置

# .thoth.yml
theme: default # can use vendor/theme to pull from github
source: .
destination: ./public

新命令

thoth new [dir],"dir" 默认为当前目录

  • 在指定目录生成新的 thoth 项目

监视命令

thoth watch 如果有更改,将生成新的网站

  • 运行 thoth generate

生成命令

thoth generate 输出到 /public

  • /public 可以进行配置

服务命令

thoth serve 将使用 PHP 网络服务器提供生成的文件?

  • 可选 --watch 选项

部署命令?

主题

主题存储在 themes 目录中,目录是主题名称

themes/default themes/blog themes/docs

主题文件

  • base.html.twig
  • home.html.twig
  • page.html.twig
  • post.html.twig
  • _head.html.twig
  • _header.html.twig
  • _footer.html.twig
  • full-width.layout.html.twig

"包含" 文件将以下划线开头

主题的资产存储在 assets 目录中,例如 themes/blog/assets