@thushan-wp/block-theme-starter
Version:
A simple CLI tool to scaffold a fresh WordPress Block Theme based on a boilerplate structure. Ideal for developers who want to speed up their workflow and follow best practices when building custom block themes for WordPress.
104 lines (71 loc) β’ 2.4 kB
Markdown
# π§± WP Block Theme Starter
A simple CLI tool to scaffold a fresh WordPress Block Theme based on a boilerplate structure. Ideal for developers who want to speed up their workflow and follow best practices when building custom block themes for WordPress.
## β¨ Features
- π§ Instantly generate a new block theme folder
- ποΈ Includes default `theme.json`, `templates/index.html`, `parts/header.html`, and `parts/footer.html`
- π¨ Comes with a sample `style.css` and `screenshot.png`
- π¦ Works as a CLI for easy, fast installation
## π¦ Installation
To install the CLI globally:
```bash
npm install -g @thushan-wp/block-theme-starter
```
## π Usage
To generate a new theme:
```bash
create-wp-block-theme
```
Youβll be prompted to enter:
- **Theme folder name** β Name of the folder to generate
- **Theme Name** β Display name of your theme
- **Theme URI** β Website URL of the theme (optional)
- **Author** β Your name or company name
- **Author URI** β Your website or profile URL
- **Description** β Short description of the theme (default: "A custom block theme.")
- **Version** β Theme version (default: "1.0")
Once done, your new theme will be created in the current working directory.
## π What You Get
```
your-theme-name/
βββ parts/
β βββ header.html
β βββ footer.html
βββ templates/
β βββ index.html
βββ screenshot.png
βββ style.css
βββ theme.json
```
## π¨βπ» Ideal For
- WordPress theme developers
- Agencies building multiple client themes
- Beginners learning full site editing (FSE)
## π§ͺ Example
```bash
create-block-theme
# Prompt:
# Theme folder name: my-theme
# Theme Name: My Theme
# Theme URI: https://example.com
# Author: Thushan Fernando
# Author URI: https://thushan.dev
# Description: A sleek modern block theme.
# Version: 1.0
# β
"my-theme" created successfully!
```
## π§ GIT Repository
You can find the source code and contribute here:
[https://github.com/wastfer/wp-block-theme-starter.git](https://github.com/wastfer/wp-block-theme-starter.git)
## π License
MIT Β© [Thushan Fernando](https://www.npmjs.com/~thushan-fernando)
## π¬ Feedback & Contributions
If you have suggestions or improvements, feel free to open an issue or PR on the GitHub repo. Letβs build better themes together!