Commit graph

10 commits

Author SHA1 Message Date
ItsDrike b444f03185
Don't use scratchpad to pass values into partials
We previously used .Scratch which is a global scratchpad, that was later
passed over to the partial with the rest of the context. The partial
then checked if this value was set, and had a fallback if it wasn't
(default value).

This approach does work in most of the cases, however in about 5% of
runs, it fails. I assume this is due to hugo spinning up multiple
threads, and each of them is changing this global scratchpad in
arbitrary order. At some point, a thread then removed this value from
the scratchpad to reset it, but another thread already checked that this
variable does exist, and has now set the no longer available variable.

To avoid this, we can instead directly pass a custom dict, which
contains the original context (.) along with another variable, which
will hold the dateformat. This however means that we can't use the
simple syntax with a default value, and the dateformat will need to be
set each time (though technically, it could be set to nil and checked
later, but if we're already specifying it, we may as well pass in this
dateformat directly)
2022-05-14 22:26:04 +02:00
ItsDrike f3419a37b1
Redesign list layout 2022-05-11 14:38:42 +02:00
ItsDrike 1eb174479a
Fix indentation 2021-08-26 03:02:16 +02:00
ItsDrike 164f1b3d53
Use simple <hr> not <hr /> 2021-08-26 02:41:39 +02:00
ItsDrike 1385f95d7f
Indent consistently with 2 spaces 2021-08-26 02:06:40 +02:00
ItsDrike ef1800933b
Make new default listing and use original in posts 2021-08-25 19:41:15 +02:00
ItsDrike 71fc71e30a
Apply some bootstrap styling 2021-08-25 11:53:41 +02:00
ItsDrike e6db609303
Use baseof for common base HTML 2021-08-24 20:06:02 +02:00
ItsDrike 9f753226f6
Add partials 2021-08-24 19:49:26 +02:00
ItsDrike 16103599b3
Add some basic layout HTML 2021-08-24 19:10:29 +02:00