Skip to content

The _tw generator creates a WordPress starter theme optimized for modern development with Tailwind CSS, Tailwind Typography and the WordPress editor.

License

Notifications You must be signed in to change notification settings

gregsullivan/_tw

Repository files navigation

_tw

This repository tracks the output of the _tw WordPress starter theme generator with all options left blank.

Right now there isn't a public repository for the generator itself. Please post issues regarding the generator to this repository.

If you're starting a new project, the generator is the best way to do that. You can also read the documentation for more details.


Note
The default contents of README.md in a generated theme are as follows:

A custom theme based on _tw

Quickstart

Installation

  1. Move this folder to wp-content/themes in your local development environment
  2. Run npm install && npm run dev in this folder
  3. Activate this theme in WordPress

Development

  1. Run npm run watch
  2. Add Tailwind utility classes with abandon

Deployment

  1. Run npm run bundle
  2. Upload the resulting zip file to your site using the “Upload Theme” button on the “Add Themes” administration page

Or deploy with the tool of your choice!

Full Documentation

Fundamentals

  • Installation
    Generate your custom theme, install it in WordPress and run your first Tailwind builds
  • Development
    Watch for changes, build for production and learn more about how _tw, WordPress and Tailwind work together
  • Deployment
    Share your new WordPress theme with the world
  • Troubleshooting
    Find solutions to potential issues and answers to frequently asked questions

In Depth

Extras

Note
The default contents of README.md end here.


Changelog

All notable changes to this project will be documented here.

The format is based on Keep a Changelog.

2024-04-05

Changed

  • Begin importing the contents of ./javascript/tailwind-typography-classes.js from @_tw/typography to ./javascript/block-editor.js
  • Update ESLint configuration to allowlist classes beginning with wp-block and wp-element

Removed

  • ./javascript/tailwind-typography-classes.js

2023-12-22

Changed

  • Update to Tailwind 3.4

2023-12-08

Added

  • Support for block editor–only styles via ./tailwind/tailwind-editor-extra.css
  • @_tw/typography to improve Tailwind Typography support in the block editor via a custom fork
  • Custom color theme and font weight overrides in ./tailwind/tailwind-typography.config.js
  • A block style for Tailwind Typography’s .lead style

Changed

  • Refactored ./javascript/tailwind-typography-classes.js, adding new helper classes

Removed

  • Tailwind Typography tweaks from ./tailwind/tailwind-typography.config.js
  • @tailwindcss/typography (replacing it with the above-mentioned fork)

2023-11-16

Fixed

  • Ensure changes to theme.json update tailwind.config.js during watch process (#79)
  • Support Yarn (#77)

2023-08-15

Fixed

  • Support for block editor styles in WordPress 6.3 (#60)

Added

  • Automatic versioning in the zip file generated by npm run bundle
  • More detailed documentation in README.md

Changed

  • Update to Tailwind 3.3
  • Revisit approach to Tailwind Typography
  • Improve comments throughout

Removed

  • @tailwindcss/line-clamp and postcss-simple-vars

Added

  • @wordpress/prettier-config and eslint-config-prettier

Changed

  • Use Prettier to format JavaScript files
  • Install ESLint directly and use the eslint:recommended configuration
  • Set ecmaVersion to latest throughout

Removed

  • @wordpress/eslint-plugin

Changed

  • Update to Tailwind 3.2
  • Revisit approach to Tailwind Typography

Added

  • Tailwind Typography support for comments
  • @tailwindcss/container-queries

Changed

  • Finish restructuring theme files with improvements from Varia
  • Update Tailwind Typography selector
  • Clean up package.json scripts

Added

  • composer.lock and package-lock.json files

Removed

  • Default theme support for core custom background and custom logo functionality
  • Default setting for content_width

Changed

  • Update to Tailwind 3.1

Removed

  • The postcss-import module, as its functionality is included with Tailwind 3.1

Added

  • Include a style.css file containing only the WordPress file header
  • Add quickstart instructions to README.md

Changed

  • Update documentation to focus on installation without symlinking
  • Update file header

2022-04-29

Added

  • JavaScript build process using esbuild
  • Tailwind plugin for Prettier (for use in CSS files)
  • Tailwind plugin for eslint (for use in PHP files)
  • A components folder, automatically including CSS files within
  • Support for nested declarations by default
  • Tailwind Typography support for TinyMCE and the classic editor

Changed

  • Restructure theme files with improvements from Varia
  • Base phpcs.xml.dist upon WordPress Coding Standards sample file
  • Improve Tailwind Typography block editor support

Removed

  • Customizer and Custom Header support

2022-01-11

Added

  • Schema to theme.json file
  • postcss-simple-vars to change CSS selectors based on build target

Changed

  • Update tailwind.config.js for Tailwind 3
  • Move Tailwind Typography modifier classes into tailwind/custom/components.css
  • Simplify Tailwind Typography configuration file
  • Switch from @_tw/typography to @tailwindcss/typography
  • Improve comments throughout

Removed

  • Alpine.js
  • Stylelint
  • Separate configuration files for front-end and editor builds

2021-10-11

Changed

  • Use .prose as our Typography selector

2021-09-09

Added

  • Support for Tailwind Typography in the block editor
  • Support for theme.json in Tailwind
  • Styles for the block editor's content, wide and full widths
  • A basic theme.json file
  • Classes for entry-title and entry-content

Changed

  • There are now multiple .eslintrc files to handle the differences between node and browser linting

2021-07-02

Changed

  • Build process migrated from Laravel Mix to Tailwind's own CLI via npm-run-all

2021-05-03

Added

  • Repository made public with initial functionality

About

The _tw generator creates a WordPress starter theme optimized for modern development with Tailwind CSS, Tailwind Typography and the WordPress editor.

Topics

Resources

License

Stars

Watchers

Forks