docsy icon indicating copy to clipboard operation
docsy copied to clipboard

Ensure a Page always has a Title

Open metafeather opened this issue 3 years ago • 1 comments

Pages without Frontmatter for title or linkTitle result in empty entries in the sidebar and list pages.

This partial provides additional fallback Titles based on the Content H1 or File name, which can replace use in multiple templates where $s.linkTitle is hardcoded

metafeather avatar Aug 14 '22 20:08 metafeather

I like this idea! Do you have any examples of what a title pulled from the file name would look like?

We should also document this behaviour in the user guide, maybe with a small update to the (increasingly enormous) Navigation and Search page: https://www.docsy.dev/docs/adding-content/navigation/#section-menu

LisaFC avatar Aug 15 '22 15:08 LisaFC