A vibrant, fast, and accessible starter theme for building static websites with Eleventy, TailwindCSS v4, and Alpine.js.
- Eleventy v3 - Fast static site generation with ES modules
- TailwindCSS v4 - Utility-first CSS framework
- Alpine.js - Lightweight JavaScript for interactivity
- Pagefind - Static search with zero configuration
- Shiki - Beautiful syntax highlighting for code blocks
- eleventy-img - Automatic image optimization (AVIF, WebP, JPEG)
- Phosphor Icons - 6,000+ icons with multiple weights
- Speculation Rules - Instant page loads with prefetching
- Accessibility - WCAG 2.1 AA compliant with automated testing
- SEO Ready - Sitemap, RSS feed, meta tags, Open Graph
- LLM Ready - llms.txt and llms-full.txt for AI assistants
- Node.js 24 or higher (see
.nvmrc) - npm
# Clone the repository
git clone https://github.com/freshjuice-dev/electric-lime-11ty-starter.git
cd electric-lime-11ty-starter
# Install dependencies
npm install
# Start development server
npm run devOpen http://localhost:8080 to view your site.
| Command | Description |
|---|---|
npm run dev |
Start development server with hot reload |
npm run build |
Build for production |
npm run clean |
Remove _site folder |
electric-lime-11ty-starter/
βββ src/
β βββ _data/ # Global data files
β β βββ build.js # Build info (git hash, timestamp)
β β βββ metadata.yaml # Site metadata
β β βββ header.yaml # Navigation config
β β βββ footer.yaml # Footer configuration
β β βββ socials.yaml # Social media links
β βββ _includes/
β β βββ layouts/ # Page layouts
β β β βββ base.njk # Base HTML layout
β β β βββ page.njk # Standard page layout
β β β βββ post.njk # Blog post layout
β β β βββ author.njk # Author page layout
β β β βββ legal.njk # Legal pages layout
β β β βββ error.njk # Error pages layout
β β βββ partials/ # Reusable partials
β β β βββ header.njk
β β β βββ footer.njk
β β β βββ metatags.njk
β β βββ _components/ # Nunjucks component macros
β β βββ index.njk
β βββ assets/
β β βββ css/
β β β βββ main.css # Entry point
β β β βββ _base.css # CSS variables, reset
β β β βββ _typography.css
β β β βββ _buttons.css
β β β βββ _forms.css
β β β βββ _utilities.css
β β β βββ _pagefind.css
β β β βββ _youtube.css
β β β βββ _high-contrast.css
β β βββ js/
β β βββ main.js
β β βββ components/
β β βββ contrast-toggle.js
β βββ authors/ # Author profiles
β βββ blog/ # Blog posts
β βββ legal/ # Legal pages
β βββ pages/ # Site pages
β βββ static/ # Static files (favicons, etc.)
βββ config/ # Eleventy configuration
β βββ collections.js
β βββ filters.js
β βββ shortcodes.js
β βββ transforms.js
β βββ plugins.js
βββ eleventy.config.js
Import and use Nunjucks macros in your templates:
{% from "_components/index.njk" import button, card, badge, authorCard %}
{# Buttons #}
{{ button({ text: "Get Started", url: "/contact/", variant: "primary" }) }}
{{ button({ text: "Learn More", variant: "secondary" }) }}
{{ button({ text: "Cancel", variant: "outline" }) }}
{# Cards #}
{{ card({
title: "Post Title",
description: "Description text",
image: "/assets/images/photo.jpg",
url: "/blog/post/",
date: page.date,
author: "john-doe"
}) }}
{# Badges #}
{{ badge({ text: "New", variant: "primary" }) }}| Class | Description |
|---|---|
.btn |
Primary lime button |
.btn--secondary |
Light background |
.btn--outline |
Transparent with border |
.btn--ghost |
No background or border |
Sizes: .btn--sm, .btn--md, .btn--lg
{% youTube "dQw4w9WgXcQ", "Video Title" %}Uses lite-youtube-embed for fast, privacy-friendly embeds (youtube-nocookie.com).
{% year %}Edit src/_data/metadata.yaml:
title: "Your Site Name"
description: "Your site description for SEO"
url: "https://yoursite.com"
language: "en"
author: "Your Name"
email: "hello@example.com"
twitter: "@yourhandle"
image: "/assets/images/og-image.png"
themeColor: "#65a30d"Edit src/_data/header.yaml:
navigation:
- label: "Home"
url: "/"
- label: "About"
url: "/about/"
- label: "Blog"
url: "/blog/"Edit src/_data/footer.yaml to configure footer columns and links.
Pagefind provides instant static search. It runs automatically after build and indexes all pages.
The search UI is at /search/.
| File | Description |
|---|---|
/sitemap.xml |
XML sitemap for search engines |
/sitemap.xsl |
Visual sitemap stylesheet |
/robots.txt |
Robots directives |
/feed.xml |
RSS feed for blog posts |
/llms.txt |
LLM-friendly site index |
/llms-full.txt |
Full content export for LLMs |
/_headers |
Security headers (Netlify/Cloudflare) |
/_redirects |
Redirect rules (Netlify/Cloudflare) |
---
title: "Page Title"
description: "Page description for SEO"
image: "/assets/images/og-image.jpg"
noindex: true # Exclude from sitemap
llms_exclude: true # Exclude from llms.txt
---Demo images are royalty-free from Pexels:
| Image | Photographer | Link |
|---|---|---|
| Author: Jane Smith | Daniel Xavier | View |
| Author: John Doe | Andrea Piacquadio | View |
| Lime/Citrus | Juan Salamanca | View |
| Strawberries | Susanne Jutzeler | View |
| Orange | Pixabay | View |
| Raspberries | Pixabay | View |
| Pineapples | Pineapple Supply Co. | View |
| Cherries | Wendy Aros-Routman | View |
Placeholder logos from Logoipsum.
Contributions are welcome! Please open an issue first to discuss what you'd like to change.
MIT License - use this starter for any project.
Built by Alex Zappa at FreshJuice
