An Eleventy blog theme focused on content, and various convenience features. Demo.
Makes use of SimpleCSS, with inspiration from Hylia and minimal-mistakes. I developed it for my blog.
Features
Generate a repo from this public template, or fork it.
Delete the tests/
folder and .github/workflows/playwright.yml
The posts go in the posts
folder. Drafts can go in the drafts
folder and will only appear when running locally (npm run start
or docker compose up
) but not when building (npm run build
).
Publish it. I've included a sample Github Action, use or modify as you need.
Running it with Docker
This will do the npm install and npm start together.
docker compose up
Then browse to http://localhost:8080/
Running it with Node
Requires Node 20. First get all the dependencies.
npm install
To serve the site, and watch for changes:
npm run start
Then browse to http://localhost:8080/
To just build the site once (normally used for Github Actions):
npm install
npm run build
Running Tests
Make sure Firefox is installed. sudo apt install firefox
Run Playwright tests, this should automatically do an npm start first.
npm test
Once you've forked this repo, copying new features and updates from this repo to yours shouldn't be done wholesale. Instead, a diff tool like meld or Beyond Compare is recommended.
For commandline, here's a useful rsync command which copies most files and excludes some unnecessary ones. At least it's a starting point:
cd your-blog-repo
rsync -av --progress ../eleventy-satisfactory/ ./ \
--exclude '.git' \
--exclude 'tests' \
--exclude '_site' \
--exclude 'node_modules' \
--exclude 'posts' --include 'posts/posts.json' \
--exclude 'drafts' --include 'drafts.11tydata.js' \
--exclude 'playwright*' \
--exclude 'test*' \
--exclude 'bottomlinks.json' \
--exclude 'screenshots'
After the rsync, it's still worth doing a git diff to see what's changed, or if there are any conflicts.
TODO/Investigate
References