Skip to content

Custom TOC/nav links #1593

Closed

Description

@bmorelli25

Summary

Add the ability to customize the TOC with links to pages that don't exist within the current content set. The goal is be able to interweave internal (elastic.co/docs/*) and external links to content into the navigation structure of a content set. This will allow us to, for example, link to API docs from within a narrative TOC.

If the content being linked to is within a different content set, the TOC should update to reflect the move to a new content set.

Activity

  1. theletterf commented on Jul 25, 2025

    @theletterf
    Member

    Agree. I think the external links path is the simplest, also to avoid crosslink resolution in the nav:

    • You define an external link like this:
    toc:
      - link: https://elastic.co/docs/something
    

    It would render like a nav item, but with an external link indicator, like we added here: #1096

  2. self-assigned this
    on Jul 25, 2025
  3. lcawl commented on Aug 28, 2025

    @lcawl
    Contributor

    This functionality was mentioned in the docs team meeting today and I am hoping that the way this is implemented we'll still only have each file appearing once in the entire navigation tree. Otherwise I think we'll hit a problem that we encountered in docsmobile where you'd land or return to the "wrong" occurrence of the page in some search / navigation experiences. If that single use limitation persists, we ought to make that as clear as possible (e.g. in https://docs-v3-preview.elastic.dev/elastic/docs-builder/tree/main/configure/content-set/navigation#toc.yml) and check for PRs that break that behaviour.

  4. theletterf commented on Aug 28, 2025

    @theletterf
    Member

    The way this is being implemented is to allow crosslinks in the nav. In that sense, a doc will only exist once in nav, but we'll be able to link to it from other navs.

  5. reakaleek commented on Sep 9, 2025

    @reakaleek
    Member

    deployed to production already

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions