Skip to content
This repository was archived by the owner on Jun 2, 2020. It is now read-only.
This repository was archived by the owner on Jun 2, 2020. It is now read-only.

Rewrite Theme/Layout #77

@Mr0grog

Description

@Mr0grog

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.

  1. Something in the JS goes off the rails pretty quickly and starts eating the CPU in a tight loop. This is really bad.

  2. We have some ugly CSS selectors that exist just to override stuff built into the theme.

  3. There are features that are just commented out or hidden (e.g. search); they should actually be removed.

  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions