Skip to content

Update mdbook to latest version (0.5.2)#27

Merged
robguthrie merged 8 commits into
loomio:mainfrom
cooldracula:zach/update-mdbook-version
Jun 5, 2026
Merged

Update mdbook to latest version (0.5.2)#27
robguthrie merged 8 commits into
loomio:mainfrom
cooldracula:zach/update-mdbook-version

Conversation

@cooldracula

@cooldracula cooldracula commented May 27, 2026

Copy link
Copy Markdown
Contributor

This PR updates the theme and syntax in the loomio docs to be compatible with the most recent version of mdbook (moving from 0.4.37 to 0.5.2.

These changes include:

  • porting our custom theme and template customizations to the 0.5.2 theme.
  • vendoring a toc.js.hbs file so that we can customize the newest sidebar with the loomio logo.
  • adding a flake.nix file for optional way to enter a dev environment, guaranteeing everyone is building with the same version of mdbook.

Ideally this looks as close to the old help pages as possible, with the only changes be improvements.

If this looks alright, I'll then incorporate some more changes like using the new Tip and Note boxes for the tips and notes in the docs.

This is an optional way to develop. Nix is not required to work on
this.  However, it adds a nice peace of mind if using nix that the
version of mdbook is always the same across development environments,
pinned to an exact commit of the nix pkg repository.
This was made by initiating a fresh theme using mdbook 0.5.0 (mdbook
init --theme) and then porting our major theme changes (notably colour
scheme and some head tags) from our original theme over to this one.
This makes a few changes so that we can have the newest sidebar, with
its folded sections, but also include our logo in the top left.

Used this issue as a guide: rust-lang/mdBook#2490

I also added a custom.css so that we could keep the html succinct,
moving the styling to our own CSS file.
The way the TOC is generated, if you just adjust the innerhtml, it
upsets the procedure for the TOC stack and ends up lacing the active
section above the logo, making it look bad.  This new method, supplied
by maintainer of mdbook, properly prepends the logo above the TOC after
it has already been generated.
@cooldracula cooldracula marked this pull request as ready for review May 29, 2026 03:22
@robguthrie robguthrie merged commit 2f50f2b into loomio:main Jun 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants