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

theme/content: head's title doesn't change in documentation #6

Open
cirocosta opened this issue Apr 5, 2022 · 0 comments
Open

theme/content: head's title doesn't change in documentation #6

cirocosta opened this issue Apr 5, 2022 · 0 comments
Labels
good first issue Good for newcomers

Comments

@cirocosta
Copy link
Contributor

problem

just looking at open tabs our history, it's hard to figure out what a particular page from the documentation was about - they all have the same page title Documentation.

Screen Shot 2022-04-05 at 5 07 41 PM

Screen Shot 2022-04-05 at 5 08 00 PM

IIUC, that's coming from the partial here

<title>{{ if .Title }}{{ .Title }}{{ else }}Documentation{{ end }}</title>

where we do end up using .Title set to Cartographer for the landing page, but because of the lack of a .Title in the other contexts, it ends up always being the same "Documentation" title.

desired

I think it'd be great if for each page we had the title set to the root header (ala the h1 of that page's content), or something similar.

proposed solution

make use of Hugo's frontmatter for passing properties to the context? not really sure (I've used it a while ago, not sure what the best practices are)

@cirocosta cirocosta added the good first issue Good for newcomers label Apr 5, 2022
@cirocosta cirocosta changed the title theme: head's title doesn't change in documentation theme/content: head's title doesn't change in documentation Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants
@cirocosta and others