Search by

offsetwp / starter-theme

w-jerome

The starter theme of an OffsetWP project: Twig templates rendered by the kernel of the project, and assets built by Vite and Tailwind CSS

Package info

github.com/offsetwp/starter-theme

Homepage

Type:project

pkg:composer/offsetwp/starter-theme

Fund package maintenance!

Buy Me A Coffee

Ko Fi

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-11-25 12:25 UTC

This package is not auto-updated.

Last update: 2026-12-01 07:48:51 UTC


README

OffsetWP Starter Theme OffsetWP Starter Theme

OffsetWP Starter Theme

The theme to start an OffsetWP project from.


  • 🌿 Twig templates
  • 🎨 Tailwind CSS
  • ⚡️ Vite and TypeScript

Requirements

  • Node 24
  • Composer

Installation on offsetwp/project-skeleton

composer create-project offsetwp/starter-theme public/app/themes/<my-theme> # Change "<my-theme>" folder name and setup the theme with interaction
nvm use && npm install
npm run dev # builds on every change; npm run build to deploy

Installation standalone (theme only)

# In a classic WordPress, from its root: the theme installs on its own, and builds from its folder.
composer create-project offsetwp/starter-theme wp-content/themes/<my-theme> # Change "<my-theme>" folder name and setup the theme with interaction
cd wp-content/themes/<my-theme>
nvm use && npm install
npm run dev
# activate from the dashboard, Appearance > Themes

Installation without interaction

The installer takes its answers as parameters: --root, --name, --author and --description. Given all four, it asks nothing. On offsetwp/project-skeleton, from the root of the project:

composer create-project offsetwp/starter-theme public/app/themes/acme --no-scripts
composer -d public/app/themes/acme run-script post-create-project-cmd -- \
  --root="$PWD" --name='Acme' --author='Acme Agency' --description='The theme of Acme.'
nvm use && npm install
npm run build

--no-scripts fetches the theme without running its installer; run-script runs it, from the folder of the theme (-d). --author= leaves the theme without an author.

Assets

npm run dev      # builds on every change, for development
npm run build    # builds once, minified, for production

Add an asset

A stylesheet for every page: @import it in assets/src/css/app.css, nothing else.

A script or a stylesheet of its own, for some pages only — front-page.ts here:

  1. Create it in assets/src/: assets/src/ts/front-page.ts, which may import '../css/front-page.css'. A stylesheet alone works the same way.

  2. Declare it in vite.config.js — at the root of the project, once installed on the skeleton:

    input: {
      app: resolve(theme, 'assets/src/ts/app.ts'),
      'front-page': resolve(theme, 'assets/src/ts/front-page.ts'),
    },
  3. Enqueue it in app/Theme/Assets.php, in enqueue(), by its source:

    $this->entry( 'theme', 'assets/src/ts/app.ts' );
    if ( is_front_page() ) {
    	$this->entry( 'theme-front-page', 'assets/src/ts/front-page.ts' );
    }

    entry() enqueues its stylesheets, then its script, as a module.

Licence

MIT. See LICENSE. Inter is under the SIL Open Font License: see OFL.txt.