Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure a Page always has a Title #1161

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants