create-tailwina-html
v1.0.0
Published
A modern HTML starter template with Tailwind CSS, Vite, and Handlebars
Maintainers
Readme
Tailwina
Tailwina is a modern, clean HTML starter template built with Tailwind CSS v4, Vite, and Handlebars. Perfect for building fast, customizable static websites.
🚀 Features
- ⚡ Vite - Lightning-fast development server with HMR
- 🎨 Tailwind CSS v4 - Utility-first CSS framework
- 📝 Handlebars - Minimal templating with partials support
- 🧩 Zero Dependencies - No jQuery or heavy frameworks
- 📱 Responsive - Mobile-first design approach
- 🔧 Easy to Customize - Clean, well-organized structure
- 📦 Modern Build - ES modules and modern JavaScript
📦 Installation
Prerequisites
Getting Started
Clone the repository
git clone <your-repo-url> cd tailwinaInstall dependencies
pnpm install # or yarn installStart the development server
pnpm dev # or yarn devOpen http://localhost:5173 in your browser.
Build for production
pnpm build # or yarn buildOutput files will be available in the
distdirectory.Preview the production build
pnpm preview # or yarn preview
📂 Project Structure
/
├── public/ # Static assets (images, favicons, etc.)
│ ├── css/ # Custom CSS files
│ │ └── custom.css # Your custom CSS entrypoint
│ └── js/ # JavaScript files
│ └── custom.js # Your custom JS entrypoint
├── scripts/ # Node scripts (favicons, placeholders, media optimization)
├── src/
│ ├── data/ # JSON data injected into Handlebars templates
│ ├── pages/ # HTML pages (entry points)
│ │ ├── index.html # Home page
│ │ └── about.html # About page
│ ├── partials/ # Handlebars partials (reusable components)
│ │ ├── head.html # HTML head section
│ │ └── layout-default.html # Default layout
│ ├── styles/ # CSS files
│ │ ├── main.css # Main stylesheet with Tailwind imports
│ │ └── tailwind-config.css # Tailwind configuration
│ └── js/ # JavaScript source files
│ └── main.js # Main JavaScript file
├── vite.config.js # Vite configuration
└── package.json # Project dependencies🎨 Customization
Tailwind Configuration
Customize your Tailwind theme by editing src/styles/tailwind-config.css:
@theme {
--font-sans: 'Inter', sans-serif;
/* Add your custom colors, fonts, etc. */
}Adding Pages
Create new HTML files in src/pages/ directory. Each file will be automatically processed by Vite and Handlebars.
Example:
{{#> layout-default title="My Page" }}
<main>
<h1>My New Page</h1>
</main>
{{/layout-default}}Using Partials
Partials are reusable Handlebars components located in src/partials/. Use them in your pages:
{{> head title="My Page" }} {{> footer }}Custom Styles
Add your custom CSS in src/styles/main.css or create new CSS files and import them.
🛠️ Available Scripts
| Command | Action |
| --------------------------- | --------------------------------------------------- |
| pnpm dev | Starts local dev server at localhost:5173 |
| pnpm build | Build your production site to ./dist/ |
| pnpm preview | Preview your build locally, before deploying |
| pnpm format | Format code with Prettier |
| pnpm optim:image | Optimize images (uses scripts/optimize-images.js) |
| pnpm optim:video | Optimize videos (uses scripts/optimize-videos.js) |
| pnpm optim:media | Optimize images + videos |
| pnpm generate:favicon | Generate favicons (outputs to public/) |
| pnpm generate:placeholder | Generate placeholder images |
🚀 Deployment
Deploy to Vercel
- Push your code to a Git repository
- Import your repository in Vercel
- Vercel will automatically detect your Vite project
- Deploy!
Deploy to Netlify
- Push your code to a Git repository
- Import your repository in Netlify
- Set build command:
pnpm build - Set publish directory:
dist - Deploy!
Deploy to Static Hosting
- Build your project:
pnpm build - Upload the contents of the
distdirectory to your hosting provider
📝 License
This project is licensed under the MIT License - see the LICENSE.md file for details.
🤝 Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
🙏 Acknowledgments
- Tailwind CSS - A utility-first CSS framework
- Vite - Next generation frontend tooling
- Handlebars - Minimal templating on steroids
Made with ❤️ for the web development community
