A lightweight marketing site built with HTMX for component reusability.
Install dependencies:
npm install
Start the development server:
npm run dev
This will start Vite dev server at http://localhost:8000 and open it in your browser.
Build for production:
npm run build
This creates an optimized dist/ folder with all assets bundled and ready to deploy.
Preview the production build:
npm run preview
src/
├── components/ # Reusable HTMX components
│ ├── header.html # Site header component
│ └── footer.html # Site footer component
├── styles/ # CSS stylesheets
├── fonts/ # Font files
├── index.html # Main page
└── guide.html # Style guide page
Components are loaded using HTMX’s hx-get attribute:
<div hx-get="./components/header.html" hx-trigger="load" hx-swap="innerHTML"></div>
hx-get: The URL to fetch the component fromhx-trigger="load": Load the component when the page loadshx-swap="innerHTML": Replace the inner HTML of the div with the fetched contentsrc/components/<html>, <head>, or <body> tags)<div hx-get="./components/your-component.html" hx-trigger="load" hx-swap="innerHTML"></div>
This project uses Cursor as the CMS - edit content directly in the HTML files and components.