Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/agents/theme-architect.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Agent Persona: Theme Architect

**Role:** Senior WordPress Block Theme Architect
**Repository:** `{{GITHUB_ORG}}/{{REPO_NAME}}`
**Repository:** `lightspeedwp/ls-theme`

---

Expand Down
18 changes: 11 additions & 7 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For full AI and developer guidance, read [`AGENTS.md`](../AGENTS.md) at the root

## Repo Overview

This is a **LightSpeed WordPress block theme starter repository**.
This is the **LightSpeed Theme** WordPress block theme repository (`lightspeedwp/ls-theme`).
One theme, one repo. Not a monorepo.

The theme uses the WordPress Full Site Editing (FSE) / block theme approach:
Expand Down Expand Up @@ -96,11 +96,15 @@ composer run lint:php # Lint PHP syntax

---

## Placeholder Tokens
## Theme Identity

If placeholder tokens like `{{THEME_NAME}}` or `{{TEXT_DOMAIN}}` appear in any file, they must be replaced before the theme is used in production.
| Key | Value |
|--------------|----------------------------------|
| Theme name | `LightSpeed Theme` |
| Theme slug | `ls-theme` |
| Text domain | `ls-theme` |
| Repo | `lightspeedwp/ls-theme` |
| Author | `LightSpeed` |
| Author URI | `https://lightspeedwp.agency/` |

Search for unreplaced placeholders:
```bash
grep -r "{{" . --include="*.php" --include="*.json" --include="*.css" --include="*.html" --include="*.md" --include="*.txt" --include="*.mjs"
```
Keep the text domain (`ls-theme`) consistent in all PHP files and theme metadata.
6 changes: 3 additions & 3 deletions .github/instructions/patterns.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Every pattern file must start with a valid registration header:
<?php
/**
* Title: My Pattern Name
* Slug: {{TEXT_DOMAIN}}/my-pattern-name
* Slug: ls-theme/my-pattern-name
* Categories: featured, text
* Description: A short description.
* Keywords: hero, banner
Expand All @@ -37,7 +37,7 @@ Patterns often contain PHP output. All output must be escaped:
// Correct:
echo esc_html( get_bloginfo( 'name' ) );
echo esc_url( home_url( '/' ) );
echo esc_html__( 'Read more', '{{TEXT_DOMAIN}}' );
echo esc_html__( 'Read more', 'ls-theme' );

// Wrong:
echo get_bloginfo( 'name' );
Expand All @@ -53,7 +53,7 @@ Prefer block markup in patterns over raw HTML:
```php
?>
<!-- wp:paragraph -->
<p><?php echo esc_html__( 'Example text', '{{TEXT_DOMAIN}}' ); ?></p>
<p><?php echo esc_html__( 'Example text', 'ls-theme' ); ?></p>
<!-- /wp:paragraph -->
<?php
```
Expand Down
6 changes: 3 additions & 3 deletions .github/instructions/php.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ Always include the text domain in translation functions:

```php
// Correct:
esc_html__( 'Read more', '{{TEXT_DOMAIN}}' );
esc_attr__( 'Search', '{{TEXT_DOMAIN}}' );
__( 'Hello', '{{TEXT_DOMAIN}}' );
esc_html__( 'Read more', 'ls-theme' );
esc_attr__( 'Search', 'ls-theme' );
__( 'Hello', 'ls-theme' );

// Wrong — missing text domain:
__( 'Hello' );
Expand Down
2 changes: 1 addition & 1 deletion .github/prompts/new-pattern.prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Generate a new WordPress block pattern for this theme.

Provide the following details before generating:
- **Pattern name**: (human-readable, e.g. "Hero with Image")
- **Pattern slug**: (e.g. `{{TEXT_DOMAIN}}/hero-with-image`)
- **Pattern slug**: (e.g. `ls-theme/hero-with-image`)
- **Category**: (e.g. `featured`, `text`, `call-to-action`)
- **Description**: (short description of what the pattern does)

Expand Down
10 changes: 5 additions & 5 deletions .github/tasks/task-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Update this file as tasks are created, started, or completed.

## Setup

- [ ] Replace all `{{PLACEHOLDER}}` tokens in the repo
- [ ] Set the theme name, slug, and text domain in `style.css`, `theme.json`, and `functions.php`
- [x] Replace all placeholder tokens in the repo
- [x] Set the theme name, slug, and text domain in `style.css`, `theme.json`, and `functions.php`
- [ ] Update `CHANGELOG.md` with the initial release date
- [ ] Update `CODEOWNERS` with the correct GitHub team
- [x] Update `CODEOWNERS` with the correct GitHub team
- [ ] Create `screenshot.png` (1200×900 recommended)
- [ ] Update `composer.json` with the correct author details
- [ ] Update `package.json` with the correct name and description
- [x] Update `composer.json` with the correct author details
- [x] Update `package.json` with the correct name and description
- [ ] Run `npm install` and `composer install`
- [ ] Run `npm run theme:validate` to confirm setup is clean

Expand Down
37 changes: 16 additions & 21 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Human developers should also read this file before contributing.

## Repo Purpose

This is a **LightSpeed WordPress block theme starter repository**.
It is designed to be used as a GitHub template for building custom WordPress block themes for client and commercial work.
This is the **LightSpeed Theme** WordPress block theme repository (`lightspeedwp/ls-theme`).
It is a production block theme for client and commercial work at [LightSpeed](https://lightspeedwp.agency/).

It is **not** specifically packaged for WordPress.org submission.
Do not add WordPress.org-specific bureaucracy unless there is clear value.
Expand Down Expand Up @@ -78,27 +78,23 @@ Do not add WordPress.org-specific bureaucracy unless there is clear value.

---

## Slug and Text Domain Consistency
## Slug and Text Domain

Replace all placeholder tokens before using this starter:
This theme uses the following identifiers consistently:

| Placeholder | Description |
|---------------------|------------------------------------------|
| `{{THEME_NAME}}` | Human-readable theme name |
| `{{THEME_SLUG}}` | Kebab-case slug (used in folder names) |
| `{{TEXT_DOMAIN}}` | Text domain (must match slug) |
| `{{THEME_URI}}` | Theme URI |
| `{{AUTHOR_NAME}}` | Author or agency name |
| `{{AUTHOR_URI}}` | Author or agency URI |
| `{{THEME_DESCRIPTION}}` | Short theme description |
| `{{REPO_NAME}}` | GitHub repository name |
| `{{GITHUB_ORG}}` | GitHub organisation name |
| Key | Value |
|------------------|--------------------------------------|
| Theme name | `LightSpeed Theme` |
| Theme slug | `ls-theme` |
| Text domain | `ls-theme` |
| Theme URI | `https://lightspeedwp.agency/` |
| Author | `LightSpeed` |
| Author URI | `https://lightspeedwp.agency/` |
| Repo | `lightspeedwp/ls-theme` |

Rules:
- `{{TEXT_DOMAIN}}` must match `{{THEME_SLUG}}` everywhere.
- Text domain must match the theme slug (`ls-theme`) everywhere.
- Keep the slug consistent in `style.css`, `theme.json`, `composer.json`, and `package.json`.
- Do not leave placeholder tokens blank — replace them with real values.
- Search the repo for `{{` to find all remaining placeholders.

---

Expand Down Expand Up @@ -157,7 +153,7 @@ Rules:
## Style Variation Guidance

- Style variations live in `styles/`.
- Two starter variations are provided: `light.json` and `dark.json`.
- Two style variations are provided: `light.json` and `dark.json`.
- Additional variations can be added as `styles/*.json`.
- `styles/blocks/` and `styles/sections/` are organisational conventions for future per-block or per-section styles.
- These nested JSON files are not automatically consumed by WordPress as global style variations — they are available for reference or tooling.
Expand Down Expand Up @@ -250,5 +246,4 @@ composer run lint:php
12. **Keep agent personas in `.agents/agents/`.** Agent persona files describe specialist roles.
13. **Do not modify `.github/workflows/` without understanding CI impacts.**
14. **Always update `CHANGELOG.md`** when making meaningful changes.
15. **Replace all placeholder tokens** before considering setup complete.
16. **Use placeholder tokens** (`{{THEME_SLUG}}` etc.) rather than leaving metadata blank.
15. **Keep slug and text domain consistent** — use `ls-theme` as both the theme slug and text domain.
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Replaced all placeholder tokens with final `ls-theme` / `LightSpeed` values across all files.
- Updated `README.md`, `AGENTS.md`, and `.github/copilot-instructions.md` to reflect the real theme repo rather than a starter template.

### Deprecated

### Removed
Expand All @@ -27,7 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Initial starter repository scaffold for LightSpeed WordPress block themes.
- Initial LightSpeed Theme repository setup.
- Root theme files: `style.css`, `theme.json`, `functions.php`, `readme.txt`.
- Block template: `templates/index.html`.
- Block template parts: `parts/header.html`, `parts/footer.html`.
Expand All @@ -48,5 +51,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

---

[Unreleased]: https://github.com/{{GITHUB_ORG}}/{{REPO_NAME}}/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/{{GITHUB_ORG}}/{{REPO_NAME}}/releases/tag/v0.1.0
[Unreleased]: https://github.com/lightspeedwp/ls-theme/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/lightspeedwp/ls-theme/releases/tag/v0.1.0
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# {{GITHUB_ORG}}/{{REPO_NAME}} CODEOWNERS
# lightspeedwp/ls-theme CODEOWNERS

# Default owner for all files
* @lightspeedwp/developers
63 changes: 20 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# {{THEME_NAME}} — LightSpeed WordPress Block Theme Starter
# LightSpeed Theme — WordPress Block Theme

A lean, production-aware starter repository for building custom WordPress block themes at LightSpeed.
LightSpeed Theme is a custom WordPress block theme built by [LightSpeed](https://lightspeedwp.agency/) for fast, accessible, and maintainable websites using the WordPress Site Editor and block editor.

---

## What This Repo Is

This is a **GitHub template repository** for creating WordPress block themes for client and commercial projects.
This is the **LightSpeed Theme** repository — a production WordPress block theme for client and commercial projects.

It provides:
- A working WordPress block theme skeleton
It includes:
- A working WordPress block theme
- Validation and linting tooling
- AI guidance files and GitHub Copilot instructions
- Structured folders for prompts, reports, tasks, docs, and AI agents

> **Note:** This starter is not specifically packaged for WordPress.org submission. It is designed for client and commercial block theme development.
> **Note:** This theme is not specifically packaged for WordPress.org submission. It is designed for client and commercial block theme development.

---

## Who It Is For

- WordPress theme developers at LightSpeed
- Developers creating custom block themes for clients
- Developers maintaining or extending this theme
- AI agents building or maintaining block themes in this repo

---
Expand Down Expand Up @@ -60,22 +60,18 @@ It provides:
## Quick Start

```bash
# 1. Clone or use this repo as a template on GitHub
# 1. Clone the repo

# 2. Replace all placeholder tokens
# Search for {{ to find all placeholders
grep -r "{{" . --include="*.php" --include="*.json" --include="*.css" --include="*.html" --include="*.md" --include="*.txt" --include="*.mjs" --include="*.yml"

# 3. Install Node dependencies
# 2. Install Node dependencies
npm install

# 4. Install Composer dependencies
# 3. Install Composer dependencies
composer install

# 5. Validate the theme
# 4. Validate the theme
npm run theme:validate

# 6. Validate JSON schema
# 5. Validate JSON schema
npm run schema:validate
```

Expand Down Expand Up @@ -161,34 +157,15 @@ npm run schema:validate

---

## How to Customise Placeholders

Search for `{{` across the repository and replace all placeholder tokens:

| Placeholder | Replace with |
|--------------------------|-------------------------------------|
| `{{THEME_NAME}}` | Human-readable theme name |
| `{{THEME_SLUG}}` | Kebab-case slug |
| `{{TEXT_DOMAIN}}` | Text domain (same as slug) |
| `{{THEME_URI}}` | Theme URI |
| `{{AUTHOR_NAME}}` | Author or agency name |
| `{{AUTHOR_URI}}` | Author or agency URI |
| `{{THEME_DESCRIPTION}}` | Short theme description |
| `{{REPO_NAME}}` | GitHub repository name |
| `{{GITHUB_ORG}}` | GitHub organisation name |

---

## What to Edit First
## What to Edit

1. `style.css` — replace all header placeholders
2. `theme.json` — set your colour palette and typography
3. `functions.php` — add any theme supports you need
4. `parts/header.html` — build your header
5. `parts/footer.html` — build your footer
6. `templates/index.html` — build your main template
7. `CHANGELOG.md` — start tracking your changes
8. `CODEOWNERS` — set your team as owners
1. `theme.json` — set your colour palette and typography
2. `functions.php` — add any theme supports you need
3. `parts/header.html` — build your header
4. `parts/footer.html` — build your footer
5. `templates/index.html` — build your main template
6. `CHANGELOG.md` — track your changes
7. `CODEOWNERS` — set your team as owners

---

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "{{GITHUB_ORG}}/{{REPO_NAME}}",
"description": "{{THEME_DESCRIPTION}}",
"name": "lightspeedwp/ls-theme",
"description": "LightSpeed Theme is a custom WordPress block theme built by LightSpeed for fast, accessible, maintainable websites using the WordPress Site Editor and block editor.",
"type": "wordpress-theme",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "{{AUTHOR_NAME}}",
"homepage": "{{AUTHOR_URI}}"
"name": "LightSpeed",
"homepage": "https://lightspeedwp.agency/"
}
],
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# docs/

This folder is for **end-user documentation** for the `{{THEME_NAME}}` theme.
This folder is for **end-user documentation** for the `LightSpeed Theme` theme.

It is intended for:

Expand Down
18 changes: 9 additions & 9 deletions functions.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* {{THEME_NAME}} functions and definitions.
* LightSpeed Theme functions and definitions.
*
* @package {{TEXT_DOMAIN}}
* @package ls-theme
*/

if ( ! defined( 'ABSPATH' ) ) {
Expand All @@ -12,9 +12,9 @@
/**
* Sets up theme supports.
*/
function {{TEXT_DOMAIN}}_setup() {
function ls_theme_setup() {
// Make theme available for translation.
load_theme_textdomain( '{{TEXT_DOMAIN}}', get_template_directory() . '/languages' );
load_theme_textdomain( 'ls-theme', get_template_directory() . '/languages' );

// Add support for block styles.
add_theme_support( 'wp-block-styles' );
Expand All @@ -25,31 +25,31 @@ function {{TEXT_DOMAIN}}_setup() {
// Enqueue editor styles.
add_editor_style( 'style.css' );
}
add_action( 'after_setup_theme', '{{TEXT_DOMAIN}}_setup' );
add_action( 'after_setup_theme', 'ls_theme_setup' );

/**
* Enqueues front-end assets.
*
* Add CSS and JS files to assets/css/ and assets/js/ and uncomment
* the relevant lines below once those files exist.
*/
function {{TEXT_DOMAIN}}_enqueue_assets() {
function ls_theme_enqueue_assets() {
// Main stylesheet (the theme header stylesheet is loaded automatically).
// Uncomment when assets/css/main.css exists:
// wp_enqueue_style(
// '{{TEXT_DOMAIN}}-main',
// 'ls-theme-main',
// get_template_directory_uri() . '/assets/css/main.css',
// array(),
// wp_get_theme()->get( 'Version' )
// );

// Main JavaScript. Uncomment when assets/js/main.js exists:
// wp_enqueue_script(
// '{{TEXT_DOMAIN}}-main',
// 'ls-theme-main',
// get_template_directory_uri() . '/assets/js/main.js',
// array(),
// wp_get_theme()->get( 'Version' ),
// true
// );
}
add_action( 'wp_enqueue_scripts', '{{TEXT_DOMAIN}}_enqueue_assets' );
add_action( 'wp_enqueue_scripts', 'ls_theme_enqueue_assets' );
Loading
Loading