A minimal, opinionated template for creating a blog using Eleventy as the static site generator and deploying to GitHub Page or Cloudflare Pages.
- Click "Use this template" to create a new repository
- Clone your new repository
- Create your first post in
posts/post-title/index.md - Test locally with
npx @11ty/eleventy --serve - Push to GitHub - your site will be automatically built and deployed
.
├── _includes/ # Layout templates
├── css/ # Custom stylesheets
├── posts/ # Blog posts (post-title/index.md)
├── .eleventy.js # Eleventy configuration
├── .github/ # GitHub Actions workflow
└── index.html # Homepage
This configuration of 11ty is setup as a simple blog roll where each post is self-contained in its own directory (the markdown and any assests). The folder name will be the URL slug (posts/my-post/index.md -> site.com/my-post). The YAML frontmatter controls the title and any othe details you want to include in the list view.
---
title: "My First Post"
date: 2024-01-01
---
Your post content here...- Include the CSS of your choice directly in the
HEADor in thecss/folder. It should implement the semantic HTML equivalent to markdown using class-less style. Simple.css is included as a starter framework. See the Simple.css customization guide for more details. - Customize the site structure by modifying any of the files in
_includes/. - Explore Eleventy's many other customization options in their official documentation
- To automatically deploy on GitHub Pages
- Follow https://docs.github.com/en/pages/quickstart
- Rename
.github/workflows/deploy.yml.exampleto.github/workflows/deploy.yml
- To deploy to Cloudflare Pages:
- When you push to the
mainbranch, the site will be built in the_sitedirectory and deployed automatically.
This was inspred by the more feature-rich 11ty/eleventy-base-blog, but with a minimal setup in mind.