johnannez / tendril
基于Timber的Wordpress库。
0.9.3
2020-09-01 19:15 UTC
Requires
- php: >=7.2.0
- timber/timber: 1.*
Requires (Dev)
- kint-php/kint: ^3.2
This package is auto-updated.
Last update: 2024-09-23 02:44:10 UTC
README
使用Timber和TailwindCSS构建Wordpress站点。
安装
- 前往您现有的Wordpress站点,并在根目录中创建一个新的composer.json文件。 示例
- 在根目录中创建一个
src\SITE文件夹。这是您所有站点特定类(帖子类型定义、块、命令、迁移等)的存放位置。 - 运行
composer install以获取PHP依赖项 - 将以下代码片段放入
wp-config.php或functions.php或自定义插件中,以加载composer库
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
require_once(__DIR__ . '/vendor/autoload.php');
}
- 运行
composer run theme以安装启动主题 - 进入新主题文件夹,运行
npm install然后运行npm run dev以确保您的构建系统正常工作。 - 在Wordpress中激活主题。有关主题的更多信息,请参阅主题目录中的README.md。