Jekyll + Tailwind + Stimulus Starter
This project template is a starting point for anyone wanting to build a static site using Jekyll, TailwindCSS, and StimulusJS. See a preview of the deployed jekyll + tailwind + stimulus starter.
Goals
- "Just works."
- Easy to deploy to Netlify.
- Small number of up-to-date dependencies.
How to use this template
- Use this template to create a new repo.
- Click the "Use this template" button.
- Create your repo on github.
- Clone your repo locally.
- Install dependencies.
bundle install
npm install
- Run in development mode.
npm run develop
- Browse to
http://localhost:4000
.
- Build your site.
- Add pages, customize the default layout, etc. (see how
index.md
works)
- Deploy
- Run
npm build
to build a production version of the site to the _site
directory.
- The included
netlify.toml
file makes it easy to deploy to netlify.
What you get with the template
- Webpack-based build pipelines
- Compiles Javascript into a bundle.
- Compiles CSS into a static file.
- Tailwind CSS 3 installed and configured
- With aspect-ratio, typography, and forms plugins enabled.
- Stimulus JS 3 installed and configured
- With an example controller
- A (very) minimal HTML structure
- A header that includes the JS and CSS bundles
- A
default.html
layout that renders page content
- Browser-sync for easier local development
- Separate
_config.dev.yml
for development specific site configuration.
How to add new pages
- Create a new file (e.g.
about.html
)
- Add front-matter to use the default template (see
index.md
)
What about the blog/posts functionality of Jekyll?
- The structure exists, but there is no longer a sample post
- It works just like normal jekyll
- You'll probably want to add a
post.html
template
Thanks to