Skip to content

add 'shortTitle' as a top matter option to enable shorter links in the sidebar for long titles #21

Open

Description

@smagdali

It would be good to be able to sometimes use a shorter text in the sidebar title from the main title - especially as the title: becomes the H1

As an example, imagine the following in your top matter:

title: "Frequently Asked Questions about the Filecoin Virtual Machine"
shortTitle: "FAQs"

should give you a nice long title and H1 for the page, but a sidebar link that's completely clear from the context but much more manageable. Helps readability and discoverability.

We do this by (copy/paste from discussion with @johnnymatthews ):

Add conditionals to the following to enable a different sidebar menu linktext, from the main title:

https://github.com/filecoin-project/filecoin-docs/blob/main/layouts/_default/list.html

https://github.com/filecoin-project/filecoin-docs/blob/main/layouts/partials/sidebar/auto-default-menu.html

Activity

  1. moved this to 👣 Needs triage in Protocol Docson Apr 4, 2023
  2. added
    dif/mediumPrior experience is likely helpful
    effort/hoursEstimated to take one or several hours
    P2Medium: Good to have, but can wait until someone steps up
    on Apr 4, 2023
  3. moved this from 👣 Needs triage to 📋 Backlog in Protocol Docson Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium: Good to have, but can wait until someone steps updif/mediumPrior experience is likely helpfuleffort/hoursEstimated to take one or several hours

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions