WordPress 开发者主题,具有现代开发工作流程

安装: 21

依赖关系: 0

建议者: 0

安全: 0

星标: 0

关注者: 0

分支: 3,056

类型:wordpress-theme

10.0.0-beta.2 2021-12-21 14:36 UTC

This package is auto-updated.

Last update: 2024-09-07 02:39:03 UTC


README

Sage

MIT License Packagist Build Status Follow Roots

WordPress 开发者主题,具有现代开发工作流程
用 ❤️ 构建

官方网站 | 文档 | 变更日志

支持

Sage 是一个开源项目,完全免费使用。

然而,在 Roots 生态系统内维护和发展新功能及产品的努力,如果没有适当的财务支持,是无法持续进行的。如果您有条件,请考虑通过以下链接进行捐赠

Sponsor on GitHub Sponsor on Patreon Donate via PayPal

关于 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 赞助商

通过 成为赞助商 来支持我们的开源开发工作。

Kinsta KM Digital Carrot C21 Redwood Realty WordPress.com Icons8 Harness Software Airfleet Genero 40Q Pantheon

社区

跟踪开发和社区新闻。