11ty Multisite

screenshot of 11ty Multisite
eleventy

A starter project that demos configuring 11ty for multi-site support

Overview

The Multisite Template for 11ty is an innovative solution for managing multiple sites from a single Eleventy repository. It streamlines the process of configuration and deployment, making it easy for developers to organize their projects efficiently. Whether you are handling various websites or different projects under one umbrella, this template provides a systematic approach to building and deploying each site independently.

With its reliance on environment variables and a structured directory setup, the template showcases how to maximize the utility of Eleventy's features. It not only aids developers in configuration but also enhances the overall workflow by ensuring that both input and output directories are carefully managed.

Features

  • Environment Variable Configuration: Utilizes an env variable named SITE to facilitate the configuration of 11ty and its plugins, enhancing flexibility for site management.

  • Directory Structure: Supports customized input and output directories for each site, which can be crucial for CI/CD processes and shared caches.

  • Template Literals Integration: Implements JavaScript template literals for dynamically injecting paths into essential functions like addPassthroughCopy(), which simplifies the setup.

  • Global Data Accessibility: Stores input and output directories as global data, ensuring that all necessary plugins can access their path information at the template level.

  • Multi-Site Deployment Compatibility: Seamlessly integrates with deployment hosts like Netlify, allowing multiple targets from the same repository with appropriate environment variables and publish directories.

  • Efficient Build Commands: Simplifies build commands for different sites using straightforward commands that enhance developer productivity without compromising on effectiveness.

  • Quiet Serving Option: Offers a '--quiet' option in the serving commands to reduce log verbosity, providing a cleaner output during development.

eleventy
Eleventy

11ty is a static site generator that allows developers to build fast, modern websites using HTML, Markdown, and other templating languages, without the need for a complex build system.

template
Templates & Themes

A template or theme refers to a pre-designed layout or structure that provides a basic framework for building a specific type of application or website. It typically includes good design, placeholder content and functional features, allowing developers to customize and fill in the details according to their specific needs.