Giter VIP home page Giter VIP logo

Comments (5)

flaki avatar flaki commented on August 10, 2024

Entries in the sidebar can be specified as non-collapsible by adding extra parameters to the sidebar.json

image

module.exports ={
  docs: [
    'suborbital-ecosystem/the-suborbital-ecosystem',
    {
      type: 'category',
      label: 'Intro to WebAssembly',
      collapsible: false,
      items: [
        'intro-to-webassembly/history',
        'intro-to-webassembly/why-webassembly'
      ]
    },
// ...

If instead we want to have certain items be collapsible but expanded-by-default we might need to write a plugin to expand sidebar configuration and translate this configuration into state handler changes.

from docs.

flaki avatar flaki commented on August 10, 2024

#15 made various improvements to this but I'm still not satisfied with the sidebar, nor from a taxonomical point of view nor from a general usability point of view. I'll need more research in particular on how other Docusaurus-based sites use the categorization and headings as those especially leave something to be desired. Many of the subcategory pages have uninformative titles without the parent category's name, fixing this will need a bit more digging.

Also would like to explore something where we fold up all main categories where one category is selected (e.g. close all of Grav, Reactr, Vektor, Compute, Sat when Atmo is selected), which affords us extra vertical real estate in the sidebar without additional scrolling.

from docs.

flaki avatar flaki commented on August 10, 2024

Noticed that the docusaurus website (itself built in Docusaurus) collapses the categories when the user opens another one, exactly the feature I was describing!
As it turns out, this is theme feature, enabled by setting autoCollapseSidebarCategories to true in the theme config.

from docs.

flaki avatar flaki commented on August 10, 2024

Docusaurus also comes with a second sidebar on the right, this is an in-page navigation for the headings within the active page (H2-H6).
Docusaurus floating TOC sidebar

It is also possible to inline this table of contents (as it is not always displayed, e.g. hidden on small screens).

Either way with the above collapsing technique and this, it might be worth considering to reduce the depth of the categorization in the sidebar, merging multiple documents which formed a whole category together into a single page of content. Of course, if later the content grows we may choose to split these pages up again.

from docs.

LauraLangdon avatar LauraLangdon commented on August 10, 2024

This seems to be resolved, so I'm closing it. We can always revisit this after the website redesign.

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.