-
Notifications
You must be signed in to change notification settings - Fork 56
Rewrite Theme/Layout #77
Description
In #68, I mangled a theme that was already a bit broken to get some basic docs out the door. However, the code for it is really terrible.
-
Something in the JS goes off the rails pretty quickly and starts eating the CPU in a tight loop. This is really bad.
-
We have some ugly CSS selectors that exist just to override stuff built into the theme.
-
There are features that are just commented out or hidden (e.g. search); they should actually be removed.
-
The nav implementation is kind of horrifying. I think there are limits to what we can make nice with Hugo, but it can be better than what it is now. From Gather and link existing docs and resources #68:
The menu/nav system is a little nutty and flips between an old system of enumerating all the contents of a section and using Hugo’s built-in menu system (originally needed because of the external links, but then I also made this ugly hack). At any rate, this really needs cleanup:
-
We can use the old method of enumerating the contents of each section, with hacks like the FAQ’s external frontmatter field to get external links. It’s not well supported in Hugo and results in some really complicated code, but it does keep things visible in the directory structure instead of in the config.toml file.
-
We can just wholesale use the Hugo menu system, which is well supported and more clean, if limited in functionality.
-
We can ditch both those and just encode the menus in the layout.
-
Basically, we probably need to gut the JS and CSS we have and start over. It’s ok if it’s pretty minimal, because most of the existing functionality is turned off or broken anyway.