docsy icon indicating copy to clipboard operation
docsy copied to clipboard

TOC heading?

Open chalin opened this issue 6 months ago • 2 comments

The feature being discussed, is whether the right-nav TOC should have a heading. Options include:

  • "On this page" - e.g.,

    • https://docs.flutter.dev/ui

      Image
    • https://getbootstrap.com/docs/5.3/getting-started/introduction/

      Image
    • https://docs.netlify.com/get-started/

    • https://docs.astro.build/en/concepts/why-astro/

    • https://prometheus.io/docs/prometheus/latest/getting_started/

  • "Contents" - e.g.:

    • https://dart.dev/language
    • https://grpc.io/docs/languages/go/quickstart/, see the in-page TOC on narrow displays
      Image
  • Page title, as proposed below


Originally posted by @MarkvanMents in https://github.com/google/docsy/issues/2287#issuecomment-2969093608

Looks nice. I don't particularly like the On this page - our solution is to have the document title at the top with an href to take the reader all the way to the top of the document. image We also don't have the selected line indented, we just add the bar to the left and add bold. But would be nice to have this OOTB in Docsy.


Tasks

  • [x] Experimental implementation: #2287
  • [ ] ...

chalin avatar Jun 13 '25 09:06 chalin

@MarkvanMents - nice. How do you manage long titles?

chalin avatar Jun 13 '25 09:06 chalin

We avoid them 😂 Or wrap them

Image

MarkvanMents avatar Jun 13 '25 09:06 MarkvanMents

I personally like On this page for clarity (this is a TOC for the page you're looking at right now, none of these headings bring you to other pages), page title feels a bit repetitive and I'm not as fond of Contents. Can we make On this page the default and have an option to change it if you want?

LisaFC avatar Oct 08 '25 10:10 LisaFC

I personally like On this page for clarity (this is a TOC for the page you're looking at right now, none of these headings bring you to other pages),

Me too.

page title feels a bit repetitive and I'm not as fond of Contents.

Agreed.

Can we make On this page the default and have an option to change it if you want?

Yes, it needs to be at least localizable, which is already in the task list of #2288. I wouldn't support any further customization. I'll close this issue.

chalin avatar Oct 08 '25 10:10 chalin