Closed krancour closed 2 years ago
✔️ Deploy Preview for brigade-docs ready!
🔨 Explore the source changes: 2c2c9cc45f04480713e425fd03291d6cfdd4ea89
🔍 Inspect the deploy log: https://app.netlify.com/sites/brigade-docs/deploys/62158cde17223b0007230745
😎 Browse the preview: https://deploy-preview-1841--brigade-docs.netlify.app
Way back in #865, it seems the sidebar was customized to be driven by data in
config.toml
instead of by front matter from content. As I understand it, this was done, at least in part, in order to take control of the order of items in the menu, which until then were in lexical order by title. (Although I think there may have been a simpler resolution available than a custom menu. There is aordersectionsby = "weight"
option that could have been specified inconfig.toml
.)Per the
docs/readme.md
our workaround left us in a less than optimal place:In the course of investigating options for internationalizing our docs (see #1828), I've come to believe that a sidebar menu that is driven by data in
config.toml
instead of by front matter from content is going to be an impediment to internationalization, so I set out to correct this duplication of weights.This led me to the following:
config.toml
ordersectionsby = "weight"
option inconfig.toml
This left me in a place where the sidebar looked exactly as it should except that in some places the name of the link in the sidebar menu used to be overridden by data that has since been removed from
config.toml
.Some research revealed the existence of the predefined
linkTitle
front matter variable. So I:linkTitle
to front matter in our content, as needed.{{ .LinkTitle }}
where it previously used{{ .Title }}
.layout/
folder rather than directly overwriting files in the theme'slayout/
folder, so I used this approach. See here for reference.Where this leaves us is:
config.toml
, clearing the path to internationalization.