This is an old revision of the document!
Eleventy
I am learning how to use Eleventy, also known as 11ty. That is a SSG. It should make building your website easier if you want every page to have the same template.
I'll write here how I set a pre-made template up for my webcomic, Just Gorly Things, to make it easier to update and faster to load than my current .js template Rarebit.
This test page is my final result.
Author's notes:
- I am using Windows 11 🤮, and running VScodium to type my website up.
- I use Vercel (connected to github) to host my site for free.
- I pay $15 for my domain name on Porkbun, but you don't need a domain name unless you want your url to look pretty.
- I have no idea what I'm doing. I just know how to install Minecraft mods so I know what folder structure is, and how to see file extensions.
- You should read Eleventy's official documentation if you're going to do anything more complex than copying a template. For now, my gorilla brain only understands how to copy a template.
Set-up process
- Using this webcomic template: https://github.com/katedee/eleventy-webcomic
- But the instructions are all in broken links, so you might have to look at this older file: https://github.com/katedee/eleventy-netlify-webcomic?tab=readme-ov-file
- Opened up VScodium and “cloned” the template from the github folder that was just forked.
- Since I already had a rarebit formatted comic, I copied my img folder over.
- Went to the file: “_data>metadata.json” and edited that to have my own info.
- Copy/pasted
npm install @11ty/eleventy
in the command line to make it install a bunch of shit. - Typed
npm audit fix
cuz it told me to fix it and it was important. - Ran
npx @11ty/eleventy --serve
in the command line, it gave me the local host url of http://localhost:blah/. - Went to the localhost url to see the preview of my website.
- Cool it works. A lot of the css could be fiddled with, but you can do that on your own time.
Adding my own pages
- There's already some example pages in the “comic” folder.
- Open “01.md”. There are notes on what you can edit.
- I replaced the “frontmatter” with my own information, such as my own comic images that I copied over from my old Rarebit files, and with the old dates and alt text from my Rarebit
comic_settings.js
. - The alt text is finicky as always. You can't use characters like
:
or“
. So keep it simple. - Wow! It just works! It's a lot easier to manage each comic page per .md file, rather than having 300 pages in one messy .json files.
Editing the styling
- Replace images like
favicon.png
andlogo.png
with your own images.
Uploading that shit
If you use Neocities, the template page has instructions for you on there. What I do may or may not be relevant to you.
- Type
npx @11ty/eleventy
into the command line to write all the gay files. - It should say something similar to
[11ty] Copied 168 Wrote 13 files in 3.75 seconds (288.2ms each, v3.1.2)
to confirm it did it correctly. Hopefully there are no error messages. - Visit your repository on github to see if it synced everything over. It should say something like “updated 3 minutes ago” or whatever above all your folders and files.
- Log into Vercel.
- It will deploy after some time. You will be assigned a random URL.
Connect a domain name
This is so you have a pretty URL. I'm using Porkbun to own scumsuck.com.
- Enter the domain you own. Since I own scumsuck.com, I'm going to put my webcomic under a subdomain of gorlytest.scumsuck.com. gorly.scumsuck.com is my main webcomic site that I shan't touch until I have everything ported.
- There's going to be an error that says “Invalid Configuration”. Click “Learn More”, and take note of the random shit under “Value”.
- The Type is “CNAME”. The host is whatever you put as your domain, in my case “gorlytest”. The answer/value is the string of numbers and letters from Vercel.
- Save your work.
- Click on your domain name.
- You should see your site. Now everyone can visit your site if you share your link. Yippee!
Commands
This is for my own reference because I will never remember this shit. Run these in the terminal. I'm using VScodium, this option is ctrl+shift+`
npx @11ty/eleventy --serve
: live previewnpx @11ty/eleventy
: run eleventy and make all those gay files for you to upload.