homepage 💀 worst debugging in my life | version 0.1
skip to navigation
go back december 18th, 2025

CONTENT WARNING: rough. rant. unfiltered. long. literally just screaming. AAAAAAAAAAAAAAAAAAA

i have just went thru something. so fukcing awful. but i fixed it and thats what matters. yippie.

discord screenshot with messages: "had worst. worst debugging in my life. fatal error (aka error that fucking breaks EVERYTHING). over 2 hours spent. fixed with 1 line of code. large pause inbetween messages, then a new message: never again."

heres a short (LONG) story: im building a comic engine. that means a site with a page generator for my comic (WOA) that means whenever i upload a page, instead of me making

1.html 2.html 3.html ... 26.html

individually,

my awesome website's code does it by itself! woah!

i make ONE template

comic.njk (ignore that its called njk rn)

and it generates me HOLY SHIIIIITTTTTT

1, 2, 3 ,4 ,5 ... 24, 25, 26 , all from ONE file, AUTOMATICALLY!!!

very cool. saves me crazy time. thats how all comic engines work.

mine however has a FUN LITTLE CHALLENGE:

it has to be STATIC to be HOSTED ON NEOCITIES because I LIKE NEOCITIES and BIG HOSTINGS KINDA SCARE ME TBH and ALSO BECAUSE I COULD DO IT FOR FREE UNTIL I REALIZED THAT EVEN IF I GO UNDER 1GB IN COMIC SIZE, I HAVE EXTREMELY LIMITED 200GB BANDWIDTH. that means that my comic gets read 200 times, it goes down and i cannot show it to anyone else.

how many times it was read on my PRIVATE RELEASE THROUGHOUT ONE WEEK?

50.

50 times.

um. anyway. yeah. that's why im on supporter's 5 dollars a month plan and i know eventually i will have to either contact the neocities guy and ask him if he can offfer me ultra premium plan thats even MORE than 5 dollars a month,

or like. i dunno. transfer somewhere else.

before that happens though, i use neocities. and its static.

if you dont know what static means, it means that every page is its own file and there is no stupid server database bullshits going on .

for something like a comic engine, being static is HELL of a challenge, but it is possible to do with some outside services (i use komments for comments) and a beautiful thing which are STATIC WEBSITE GENERATORS.

i tried to use hugo. that didn't go well. i tried 11ty!

things like 11ty lets you generate stuff from your file databases and use all these cool server-side like features... except then it turns it into a regular regular html file. every single page is a regular regular html file. all of the data gets turned into regular pages. ta-da!

11TY on NUNJUCKS (two different things: 11ty is the STATIC SITE GENERATOR, script that generates you stuff, while nunjucks is a TEMPLATE LANGUAGE that you can use with a static site generator) is great for me because i did do a dynamic site with a content management system that uses TWIG + SYMFONY PHP once and TWIG + SYMFONY PHP looks almost the same as 11TY on NUNJUCKS!

^ SPOILER WARNING : ITS NOT THE FUCKING SAME-----

///

anyway. it's 17.12.2025. i proudly added TRANSLATING THE WEBSITE FEATURE with a TRANSLATION PLUGIN throughout the day before that ended up with hours long bug-hunting but it works. so good.

can't wait to translate my website.

actually. i didnt test one thing. most ESSENTIAL THING.

THE FUCKING COMIC PAGES GENERATOR.

it's three days before public release of my webcomic and whenever you use the comic page,

THE FUCKING COMIC PAGE DISSAPEARS. ENTIRELY.

and it's not the image that doesnt load. Oh Boy. Nope!

website. being completely empty except for background

ITS THE FUCKING COMIC PAGE ITSELF???????????????? comments? save button? load button? these are GONE.

not only that but when i go into my console to see OH GOD WHAT DID I DO WRONG, it only tells me that i, quote,

"redeclared a variable"

what is that?

well.

when you write bad code its when you try to make same variable mean two things at same time.

var x = 'blue'; var x = 'red';

your computer sees blue and red and cant pick so it throws an error.

fun fact,

you can also write

var x = 'blue'; var x = 'blue';

and it will give you the same error. because. it also can't pick even when the options are the same.

you do not declare variables twice.

you must think: wow avrum! that seems like such a small tiny mistake! just find that time you redeclared it and remove it! easy fix!

ISSUE:

all of variables are declared once.

the whole thing was working a day ago fine, it cant be the variables, what the fuck? i desperately look into the page code using my favorite FIREFOX DEVTOOLS, but it only shows me a single

var x = 'y'

kind of statement. only once.

where THE FUCK does it get redeclared, i think? i get so afraid. i had this issue before and didn't know how to fix it. what am i doing wrong? i change all of my files but it still doesn't work.

i start to realize.

oh no.

SOMETHING IS INHERENTLY BROKEN ABOUT THE WAY WEBSITE IS BUILT.

i look at the translation, at the plugin, i remove the languages, i remove the plugin, i do anything and it doesnt help it.

i literally choose to rebuild the entire fucking website from scratch and it breaks, over and over again, for various reasons.

what is wrong?

how does it work?

i am freaking out. it's night and the release is in three days, and i have plenty of other work to do before that.

i rebuild it from scratch. again. without the translation plugin. slowly. tenderly.

the answer was...

in a single line.

===

THE LINE:

code editor. in it, text: layout: null. added caption with an errow pointing to layout:null: 2 hours. one single line that i added to fix fuckign everything.

layout is null- h

huh??? what the fuck ?

to those who do not know what the fuck, though,

let me explain how exactly it creates 26 comic pages out of one:

you have a TEMPLATE, aka a LAYOUT!

it looks roughly like this

<head>stuff here blahblahblah</head>
<body>
<header>COOL HEADER THAT APPEARS IN EVERY PAGE</header>
<main>
{{content | safe}} </main>
<footer>COOL FOOTER THAT APPEARS IN EVERY PAGE/footer> </body>

and then you have the pages themselves which look like this:

<p>pawsome text here!</p> <img src='./imgs/img.png'>

or perhaps like

<img src='./imgs/img1.png'> <img src='./imgs/img2.png'> <img src='./imgs/img3.png'> <p>other pawsome text</p>

regardless of what i put, it will always be generated with a layout (header and footer) as long as i specify that i want that layout! 💖

so typically, the pages files actually look like

layout: template.njk
---
<p>pawsome text here!</p> <img src='./imgs/img.png'>
layout: template.njk
---

<img src='./imgs/img1.png'> <img src='./imgs/img2.png'> <img src='./imgs/img3.png'> <p>other pawsome text</p>

and thats how 11ty, STATIC WEBSITE GENERATOR, automatically, without me, makes them into

<head>stuff here blahblahblah</head>
<body>
<header>COOL HEADER THAT APPEARS IN EVERY PAGE</header>
<main>
<p>pawsome text here!</p> <img src='./imgs/img.png'>
</main>
<footer>COOL FOOTER THAT APPEARS IN EVERY PAGE/footer> </body>

and

<head>stuff here blahblahblah</head>
<body>
<header>COOL HEADER THAT APPEARS IN EVERY PAGE</header>
<main>
<img src='./imgs/img1.png'> <img src='./imgs/img2.png'> <img src='./imgs/img3.png'> <p>other pawsome text</p> </main>
<footer>COOL FOOTER THAT APPEARS IN EVERY PAGE/footer> </body>

.

wow so useful and cool and awesome! love it! what can go wrong!

well heres what can go wrong:

TOO MUCH AUTOMATION.

i am a lazy guy. i cannot afford to write "layout: template.njk" on every my file im so tired cmon.

thats why i have additional script, in the FOLDER of my files, which says

layout: template.njk

and it applies my wonderful template to ALLLLLLLLL of the pages. i do that mostly because i have two languages, and i want all of my ukrainian files to automatically have template_ua.njk and my english files to have template.njk! so cool!

now heres where shit goes down. remember my awesome AUTO-GENERATING COMIC PAGES, FROM 1 TO 26?

they're built a little different. they need a NEW script! like... this.

--- pagination:
data: comic
size: 1
permalink: 'en/comics/comics_1/{{pagination.pageNumber + 1}}.html'
title: 'Losers of Near-Kyiv'
---

{% extends "template.njk" %} {% block inside %} <img src="imgs/comics/{{pagination.pageNumber + 1}}.png"> {% endblock %}

what it does, is it gets data from my file comic.js! comic.js tells how many pages to make. lets say... 26 :] its size 1 means it makes 1 page per all specified 26 times i have in comic.js! permalink tells what page i use. title tells what title i want for every page.

and the "extends template" bullshit is how i tell my beautiful generator that it MUST use the template i specified: same header, same footer!

i put it because the cool awesome tutorial for creating pages out of data files had it:D

issue.

uhm.

i already have installed script that tells my files to automatically use the template.njk on english pages and template_ua.njk on ukrainian pages.

and this script extends. template.njk

while using

template.njk.

and that's where the fucking "redeclared a variable" comes from:

I WAS HAVING MY WHOLE WEBSITE LOADED INSIDE OF MY WHOLE WEBSITE.

my browser found it so bizzare that in devtools, it only showed the website script once, and only way i was able to find out is by going to raw source code (like this) to figure it out.

i found it out by rebuilding the entire website from scratch and navigating : at what fucking point does everything break. took me two hours. thanks.

took me one line to fix.

i dont know what this is a lesson in. debugging, probably.

but thanks for listening to my rant and holy shit one day i will just use php like a normal person. one day.

FUN NOTE: the comic , is not , in fact, 26 pages.
it is. Much Longer Than That. go back?