Bash function to create an Eleventy project
✓ Published0🌍 Public
Aachanda101
Last edited Dec 26, 2021
Created on Dec 31, 2021
This example shows a Bash function that automates the setup of a new Eleventy static-site project. It creates the directory structure, initializes a Git repository, and writes configuration files including `.gitignore`, `.eleventy.js`, and a modified `package.json` with build and dev scripts. The function then runs `npm init -y`, installs the `@11ty/eleventy` package, and commits the initial files. It relies on shell commands like `mkdir`, `echo`, and `sed` to scaffold the project.
AI-generated description