charliefishtank / sage
WordPress 开发者主题,具有现代开发工作流程
10.0.0-beta.2
2021-12-21 14:36 UTC
Requires
- php: ^7.3|^8.0
- roots/acorn: v2.0.0-beta.6
Requires (Dev)
- filp/whoops: ^2.12
- squizlabs/php_codesniffer: ^3.6
Suggests
- log1x/sage-directives: A collection of useful Blade directives for WordPress and Sage (^1.0).
- log1x/sage-svg: A useful SVG directive for inlining SVG's within Blade views (^1.0).
- dev-main
- 10.0.0-beta.2
- 10.0.0-beta.1
- 9.x-dev
- 9.0.10
- 9.0.9
- 9.0.8
- 9.0.7
- 9.0.6
- 9.0.5
- 9.0.4
- 9.0.3
- 9.0.2
- 9.0.1
- 9.0.0
- 9.0.0-beta.4
- 9.0.0-beta.3
- 9.0.0-beta.2
- 9.0.0-beta.1
- 9.0.0-alpha.4
- 9.0.0-alpha.3
- 9.0.0-alpha.2
- 9.0.0-alpha.1
- 8.6.0
- 8.5.4
- 8.5.3
- 8.5.2
- 8.5.1
- 8.5.0
- 8.4.2
- 8.4.1
- v3.0.0
- v2.0.0.x-dev
- v2.0.0
- v1.0.2
- v1.0.1
- v1.0.0
- dev-dependabot/npm_and_yarn/minimist-1.2.8
- dev-dependabot/npm_and_yarn/main/wordpress/browserslist-config-5.11.0
- dev-dependabot/npm_and_yarn/main/eslint-8.35.0
- dev-dependabot/npm_and_yarn/main/tailwindcss-3.2.7
- dev-dependabot/npm_and_yarn/main/roots/sage-6.9.1
- dev-dependabot/npm_and_yarn/main/prettier-2.8.4
- dev-dependabot/npm_and_yarn/main/roots/bud-6.9.1
- dev-dependabot/npm_and_yarn/main/postcss-preset-env-8.0.1
- dev-dependabot/npm_and_yarn/main/postcss-8.4.21
- dev-dependabot/npm_and_yarn/json5-1.0.2
- dev-dependabot/npm_and_yarn/express-4.18.2
- dev-dependabot/npm_and_yarn/main/postcss-import-15.1.0
- dev-dependabot/npm_and_yarn/loader-utils-1.4.2
- dev-dependabot/npm_and_yarn/minimatch-3.1.2
- dev-dependabot/npm_and_yarn/main/autoprefixer-10.4.13
- dev-dependabot/npm_and_yarn/terser-5.14.2
- dev-dependabot/composer/main/roots/acorn-v2.1.2
- dev-dependabot/npm_and_yarn/follow-redirects-1.14.8
- dev-dependabot/npm_and_yarn/nanoid-3.2.0
- dev-pr-labeler
- dev-remove-config-directory
- dev-type-declarations
- dev-2768-acorn-as-requirement-not-dependency
- dev-asset-pipeline
- dev-import-maps-prototype
- dev-log1x/km
- dev-build-tooling
- dev-10.0.0-dev
- dev-preloading
This package is auto-updated.
Last update: 2024-09-07 02:39:03 UTC
README
WordPress 开发者主题,具有现代开发工作流程
用 ❤️ 构建
支持
Sage 是一个开源项目,完全免费使用。
然而,在 Roots 生态系统内维护和发展新功能及产品的努力,如果没有适当的财务支持,是无法持续进行的。如果您有条件,请考虑通过以下链接进行捐赠
关于 Sage
Sage 是一个以效率驱动、具有现代开发工作流程的 WordPress 开发者主题。
当前 main
分支跟踪的是处于活跃开发状态的 Sage 10。寻找 Sage 9 或最新的 Sage 10 测试版本? 查看版本。
特点
- 借助 Laravel 及其可用包的强大功能,这得益于 Acorn。
- 利用 Laravel Blade 清晰、高效的模板设计。
- 由 Bud 驱动的闪电般的快速前端开发工作流程。
- 默认支持 TailwindCSS。
要求
在继续之前,请确保已安装所有依赖项
主题安装
使用 Composer 从您的 WordPress 主题目录安装 Sage(将下面的 your-theme-name
替换为您主题的名称)
# @ app/themes/ or wp-content/themes/
$ composer create-project roots/sage your-theme-name
要安装 Sage 的最新开发版本,请将 dev-main
添加到命令末尾
$ composer create-project roots/sage your-theme-name dev-main
主题结构
themes/your-theme-name/ # → Root of your Sage based theme ├── app/ # → Theme PHP │ ├── Providers/ # → Service providers │ ├── View/ # → View models │ ├── admin.php # → Theme customizer setup │ ├── filters.php # → Theme filters │ ├── helpers.php # → Helper functions │ └── setup.php # → Theme setup ├── bootstrap/ # → Acorn bootstrap │ ├── cache/ # → Acorn cache location (never edit) │ └── app.php # → Acorn application bootloader ├── config/ # → Config files │ ├── app.php # → Application configuration │ ├── assets.php # → Asset configuration │ ├── filesystems.php # → Filesystems configuration │ ├── logging.php # → Logging configuration │ └── view.php # → View configuration ├── composer.json # → Autoloading for `app/` files ├── composer.lock # → Composer lock file (never edit) ├── public/ # → Built theme assets (never edit) ├── functions.php # → Theme bootloader ├── index.php # → Theme template wrapper ├── node_modules/ # → Node.js packages (never edit) ├── package.json # → Node.js dependencies and scripts ├── resources/ # → Theme assets and templates │ ├── fonts/ # → Theme fonts │ ├── images/ # → Theme images │ ├── scripts/ # → Theme javascript │ ├── styles/ # → Theme stylesheets │ └── views/ # → Theme templates │ ├── components/ # → Component templates │ ├── forms/ # → Form templates │ ├── layouts/ # → Base templates │ └── partials/ # → Partial templates ├── screenshot.png # → Theme screenshot for WP admin ├── storage/ # → Storage location for cache (never edit) ├── style.css # → Theme meta information ├── vendor/ # → Composer packages (never edit) └── bud.config.js # → Bud configuration
主题设置
编辑 app/setup.php
以启用或禁用主题功能,设置导航菜单、文章缩略图大小和侧边栏。
主题开发
- 在主题目录中运行
yarn
以安装依赖项 - 使用您的本地开发 URL 更新
bud.config.js
构建命令
yarn dev
— 当文件发生变化时编译资源,启动 Browsersync 会话yarn build
— 为生产编译资源
文档
贡献
欢迎所有人贡献。我们有一份 贡献指南 来帮助您开始。
Sage 赞助商
通过 成为赞助商 来支持我们的开源开发工作。
社区
跟踪开发和社区新闻。
- 在 Roots Discourse 上参与
- 关注 @rootswp 在 Twitter 上的动态
- 阅读并订阅 Roots 博客
- 订阅 Roots 通讯
- 收听 Roots 无线电播客