A WordPress starter theme using BladePHP, TailwindCSS, and Vite.js, designed for flexibility, performance, and clean development practices.
main.js
entry point for JavaScript logic.Ensure you have the following tools installed:
git clone https://github.com/blazl/BladeTailwind.git
cd bladetailwind
Install the PHP and Node.js dependencies:
composer install # Install PHP dependencies
npm install # Install JavaScript dependencies
# or
yarn install
Copy the entire theme folder to your WordPress installation's wp-content/themes
directory.
Log in to your WordPress admin dashboard and activate the BladeTailwind Vite Theme from the Appearance > Themes section.
Run the Vite development server to enable hot module replacement (HMR):
npm run dev
# or
yarn dev
BladePHP is used for templating. All templates are stored in the resources/views
directory.
Create resources/views/layout.blade.php
:
<!doctype html>
<html @php(language_attributes())>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
@php(wp_head())
</head>
<body @php(body_class('font-sans antialiased'))>
@php(wp_body_open())
@include('partials.header') <!-- Include header -->
<main class="container mx-auto">
@yield('content') <!-- Yield content -->
</main>
@php(wp_footer())
</body>
</html>
Command | Description |
---|---|
npm run dev |
Start Vite dev server with HMR |
npm run build |
Compile assets for production |
If you find a bug or have suggestions for improvement, feel free to submit an issue or pull request.
This theme is open-sourced software licensed under the MIT License.