eleventy-rarebit-template is a starter template for Eleventy that's built to replicate the functionality found in geno7's Rarebit webcomic template.
If you're new to Eleventy, make sure you go over its Getting Started guide.
This template is built assuming you'll be deploying your site to Neocities. If that isn't the case, feel free to delete the repository's .github folder and skip steps 2 & 3. Otherwise, setting up your site goes as follows...
NEOCITIES_API_TOKENnpm installnpm startYou now have a hot-reloading preview of your website! Go ahead and start tailoring the template for your comic. When you're ready to publish, just commit and push your changes in GitHub Desktop; your site should update on Neocities shortly afterwards!
Comic pages can be stored in any subfolder within your Eleventy project's input directory. You can specify their custom data - whether that be titles, images, or thumbnails - through template and directory data files or front matter data.
// Directory Data
{
"tags": ["comic"],
"thumb": "/img/thumbs/default.png",
"layout": "layouts/strip.liquid"
}
---
# Front Matter Data
title: The First Page Title
images: ['/img/comics/pg1.jpg']
alt: Here's some alt text!
thumb: '/img/thumbs/pg1.png'
tags:
- chapter1
---
Layouts can then be applied to define how the page and its data are rendered.
<!-- `strip.liquid` (Snippet) -->
<div class="comic">
<h1></h1>
<div id="comicPage">
<div id="textcomment">
</div>
</div>
<div class="comicNav">
<a href="/comic/01/#comicPage">First</a>
<a href="/comic/28/#comicPage">Last</a>
</div>
</div>
Still curious? Start exploring the template or see it working for yourself!