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

HTML Title property not set properly #3190

Closed
TazorDE opened this issue Feb 3, 2025 · 5 comments
Closed

HTML Title property not set properly #3190

TazorDE opened this issue Feb 3, 2025 · 5 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation
Milestone

Comments

@TazorDE
Copy link
Member

TazorDE commented Feb 3, 2025

Link to the Page

https://next.skeleton.dev/docs/components/app-bar/svelte

Describe the Issue (screenshots encouraged!)

The page title of both the components and integrations sections subpages are not set properly and instead read
(Title) - Skeleton, when the expected title would be: AppBar - Skeleton or something similar

Image

@TazorDE TazorDE added the documentation Improvements or additions to documentation label Feb 3, 2025
@TazorDE TazorDE added this to the v3.0 (Next) milestone Feb 3, 2025
@endigo9740
Copy link
Contributor

endigo9740 commented Feb 3, 2025

Adding context:

This happens on the pages that split between the meta/react/svelte .mdx files, so it's likely that the frontmatter isn't being passed in the same manner as most pages.

@endigo9740 endigo9740 added bug Something isn't working and removed bug Something isn't working labels Feb 4, 2025
@phamduylong
Copy link
Contributor

Unsure how this has worked before but it seems like the metadata set in meta.mdx (components) isn't applied correctly. Explicitly setting the title in react.mdx and svelte.mdx worked just fine.

@endigo9740
Copy link
Contributor

endigo9740 commented Feb 6, 2025

@phamduylong the point of the Meta file is to prevent having to set redundant info in each framework file. We have 2 frameworks now, but may have upwards of 4 later. That's a lot of duplication. The way we've setup these sections isn't really how Astro is intended to work, but it was the best we could come up with to solve this issue.

So the fix for this needs to happen where the title is passed or read...

The title is passed to the root layout here:

https://github.com/skeletonlabs/skeleton/blob/next/sites/next.skeleton.dev/src/layouts/LayoutDoc.astro#L46

And read and displayed here:

https://github.com/skeletonlabs/skeleton/blob/next/sites/next.skeleton.dev/src/layouts/LayoutRoot.astro#L14

If frontmatter.title isn't available for the split pages, well need to revert to a generic title for those sections right now.

@phamduylong
Copy link
Contributor

If frontmatter.title isn't available for the split pages, well need to revert to a generic title for those sections right now.

I don't object to the approach of shared meta.mdx files, I'm just wondering had it ever work before, so as to know if something broke it recently. Will take a closer look at this at some point next week.

@endigo9740
Copy link
Contributor

endigo9740 commented Feb 7, 2025

No, actually the dynamic title is a new add within the last couple weeks! Previously this just said "Skeleton" on every page. So this is new territory we're exploring. I enable the feature but failed to test the split/meta pages because it didn't occur to me those might operate differently.

The update occurred here: #3160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants