Introduction
Eleventy-multilingual starter is a project template designed for creating multilingual websites using Eleventy, a static site generator. This starter is based on Jérôme Coupé's blog post about building multilingual sites with Eleventy. It includes a language switcher and an index page that detects the user's browser language to display an appropriate "enter website" message.
Main Features
- Multilingual support built-in
- Language switcher functionality
- Browser language detection for initial page load
- Raw CSS file included (no preprocessor or methodology applied)
- Pre-configured to work with Forestry, a Git-based CMS
- Easy to customize and extend
Installation Steps
Clone the repository:
git clone git@github.com:lea37/eleventy-multilingual.git
Navigate to the project directory:
cd eleventy-multilingual
Install dependencies:
npm install
Start the development server:
npm run serve
Usage Instructions
Customize content:
- Edit files in the
src
directory to modify pages and layouts - Add new languages by creating corresponding directories and files
- Edit files in the
Modify styles:
- Edit the raw CSS file to adjust the appearance of your site
Configure Forestry CMS (optional):
- Import your repository into Forestry for content management
- Make changes through the Forestry interface, which will be committed back to the repository
Build for production:
- Run the build command (not specified in the README, likely
npm run build
) - Deploy the generated static files to your hosting platform
- Run the build command (not specified in the README, likely
Important Notes
The project uses a simple approach to multilingual support, making it easy to understand and modify.
The included CSS is intentionally left as a raw file, allowing developers to implement their preferred styling methodology.
Browser language detection on the index page helps provide a better user experience for international visitors.
The starter is pre-configured for use with Forestry CMS, but this integration is optional.
While the starter provides a solid foundation, developers may need to extend its functionality for more complex multilingual requirements.
Regular updates to Eleventy and other dependencies may be necessary to maintain security and access new features.
Contributors are welcome to improve the starter, as indicated by the open-source nature of the project on GitHub.
For more Eleventy starter examples, users are encouraged to check the list of repositories mentioned in the README.