Eleventy in a Box is a reusable Eleventy starter for blogs, brochure websites, and small editorial projects. Optional add-on feature packs are available so you can add extra functionality when needed.
- Eleventy v3
- Netlify CMS admin at
/admin/ - Neutral starter content and placeholder assets
- Feature-pack system for optional modules
npm installnpm run startThe development server runs at http://localhost:8080.
npm run buildStatic files are written to dist/.
The build now clears dist/ first, so stale output is removed automatically.
The base boilerplate is intentionally minimal. Optional sections (for example, blog, FAQs, portfolio, and team) can be added as feature packs. Reusable interface patterns, including alternate navigation treatments, can also be installed as packs.
- Feature flags are in
features.json - Pack code lives in
feature-packs/<name>/ - Drop-in content/layout starter files live in
feature-packs/<name>/files/ - Feature styles can live in
feature-packs/<name>/files/src/css/<name>.cssand are loaded only when enabled
npm run add:teamThis command:
- Enables
"team": trueinfeatures.json - Copies team layouts/content into
src/ - Adds
/team/to both main and footer navigation - Merges the Team page and collection into
src/admin/config.yml
npm run add:navigation-menusThis command:
- Enables
"navigationMenus": trueinfeatures.json - Copies a reusable navigation menu partial, stylesheet, and data file into
src/ - Keeps the existing navigation items and swaps the header to a menu button pattern
- Lets you choose between
"overlay-small","overlay-large", and"slide"insrc/_data/navigation_menu.json
npm run add:blogThis command:
- Enables
"blog": trueinfeatures.json - Copies blog layouts/content into
src/ - Adds
/blog/tosrc/_data/navigation.jsonif missing - Merges the Blog page and posts collection into
src/admin/config.yml
npm run add:case-studiesThis command:
- Enables
"caseStudies": trueinfeatures.json - Copies case study layouts, content, and sample entries into
src/ - Adds
/case-studies/to both main and footer navigation - Merges the case studies page and collection into
src/admin/config.yml
npm run add:faqsThis command:
- Enables
"faqs": trueinfeatures.json - Copies FAQ layouts, content, and sample entries into
src/ - Adds
/faqs/to both main and footer navigation - Merges the FAQ page and collection into
src/admin/config.yml
npm run add:changelogThis command:
- Enables
"changelog": trueinfeatures.json - Copies changelog layouts, content, and sample release entries into
src/ - Adds
/changelog/to both main and footer navigation - Merges the changelog page and collection into
src/admin/config.yml
npm run add:portfolioThis command:
- Enables
"portfolio": trueinfeatures.json - Copies portfolio layouts, content, and sample entries into
src/ - Adds
/portfolio/to both main and footer navigation - Merges the portfolio page and collection into
src/admin/config.yml
npm run add:servicesThis command:
- Enables
"services": trueinfeatures.json - Copies service layouts, content, and sample entries into
src/ - Adds
/services/to both main and footer navigation - Merges the services page and collection into
src/admin/config.yml
npm run add:testimonialsThis command:
- Enables
"testimonials": trueinfeatures.json - Copies testimonial layouts, content, and sample entries into
src/ - Adds
/testimonials/to footer navigation - Merges the testimonials page and collection into
src/admin/config.yml
You can preview changes without writing files:
node scripts/add-feature.js team --dry-run
node scripts/add-feature.js blog --dry-run
node scripts/add-feature.js case-studies --dry-run
node scripts/add-feature.js changelog --dry-run
node scripts/add-feature.js faqs --dry-run
node scripts/add-feature.js navigation-menus --dry-run
node scripts/add-feature.js portfolio --dry-run
node scripts/add-feature.js services --dry-run
node scripts/add-feature.js testimonials --dry-runYou can remove a pack the same way:
npm run remove:blog
npm run remove:case-studies
npm run remove:changelog
npm run remove:faqs
npm run remove:navigation-menus
npm run remove:portfolio
npm run remove:services
npm run remove:testimonials
npm run remove:teamThe removal script:
- Disables the pack feature flag in
features.json - Removes installed pack files from
src/ - Removes manifest-driven navigation items
- Removes CMS entries defined by the pack
By default, modified installed files are left in place. Use --force only when you want to remove those as well.
npm run check:boilerplate
npm run check:cssThis checks the feature-pack wiring for:
- Required pack files
- Matching add/remove package scripts
- Feature flags
- Navigation entries
- CMS fragments
- Disabled packs that are still installed in
src/
The CSS audit checks for:
transformshorthand usage- Undefined
data-layoutnames in templates - Pack CSS files that are not wired through
head.html - CSS links in
head.htmlthat do not point to a real pack stylesheet
src/index.md: homepagesrc/about.md: about pagesrc/contact.md: contact pagesrc/404.md: 404 pagesrc/_data/site-content.json: editable site content for the CMSsrc/_data/site.js: computed site data and environment-aware URL logicsrc/_data/navigation.json: main navigationsrc/_data/footer_navigation.json: footer navigation
Layouts use city names in data-layout and can change grid rhythm with data-grid.
The default rhythm is 4-5.
<div class="layout" data-layout="berlin">Switch the same city recipe onto another compound grid:
<div class="layout" data-layout="berlin" data-grid="4-6">Available grid rhythms are 4-5, 4-6, and 3-4.
The 4-6 rhythm shares the same named lines as 4-5 where possible, while 3-4 has a compact override layer for city recipes that need fewer b lines.
Use these names unless a pack has a specific reason not to:
featureImage: page-level hero or lead imagefeatureImageCaption: optional caption forfeatureImageimage: main item image when the pack is not already using an established field namethumbnail: list or card image when the pack is not already using an established field nameavatar: person imagelogo: brand or company markclientLogo: client-specific logo inside case studies or similar work content
Keep new aliases to a minimum. Reuse an existing name when the meaning is already clear.
For index pages and content entries, prefer these fields where they fit:
titlemetaTitlemetaDesccanonicalUrlogTitleogDescriptionogTypeogImageogImageAltledesummaryorderfeaturedslug
Editable site-wide content belongs in src/_data/site-content.json.
Computed values such as absoluteUrl and assetPath belong in src/_data/site.js.
Site-wide defaults for metadata and analytics also live in src/_data/site-content.json.
Font loading settings also live in src/_data/site-content.json.
The CMS is configured for Git Gateway on the main branch. Before launching a real site:
- Edit
src/_data/site-content.jsonor use the CMS Globals section for contact details, default metadata, social images, analytics IDs, and font loading. - Replace the starter copy with project content.
- Enable Netlify Identity and Git Gateway in your Netlify project.
Font loading is configurable in src/_data/site-content.json or the CMS Globals section:
fonts.mode:none,google, orself-hostedfonts.googleFontsUrl: the full Google Fonts stylesheet URL when usinggooglefonts.preconnectGoogleFonts: whether to add Google Fonts preconnect hintsfonts.stylesheet: a local stylesheet path such as/css/fonts.csswhen usingself-hosted
If you want to package this starter as a commercial product, see docs/sellable-boilerplate-checklist.md. It includes a practical launch checklist and the first files to tighten before charging for it.