Skip to content

Conversation

@metafeather
Copy link

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

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
@LisaFC
Copy link
Collaborator

LisaFC commented Aug 15, 2022

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

@chalin chalin marked this pull request as draft August 15, 2022 16:33
Copy link
Collaborator

@chalin chalin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. We started discussing this during the PSC meeting today. I have a few potential concerns which I'll share a little later. (Marking this as draft in the meantime to ensure it doesn't get inadvertently merged.)

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

Labels

None yet

3 participants