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

Add Article structured data #83

Open
julien-deramond opened this issue Sep 14, 2024 · 1 comment
Open

Add Article structured data #83

julien-deramond opened this issue Sep 14, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@julien-deramond
Copy link
Contributor

Is your feature request related to a problem?

Developers can add structured data to their website to help Google Search understand the content, and also sometimes add a dedicated rendering in the search results. More information.

The Article structured data (Article, NewsArticle, BlogPosting) could be a nice addition to Starlight Blog.

Describe the solution you'd like

One could optionally provide the right information, the structured data type definitions, in the frontmatter for instance (for the information not already available).

If most, or all, information is already there, Starlight Blog could update the head automatically to add this structured data <script>.

Describe alternatives you've considered

I've implemented it in my own project. This is not the best implementation ever, but it gives clues about some potential solution "from outside": Open-reSource/openresource.dev@5c42ffd

Additional Context

No response

@julien-deramond julien-deramond changed the title Add structured data Add Article structured data Sep 14, 2024
@HiDeoo
Copy link
Owner

HiDeoo commented Sep 14, 2024

Thanks for the feedback 🙌

I definitely think that could be a good improvement.

If most, or all, information is already there, Starlight Blog could update the head automatically to add this structured data <script>.

I'll need to read again the documentation but I'm leaning towards using the Microdata format instead of JSON-LD, maybe a bit easier to maintain.

Not sure when I'll have time to implement this but altho worth noting that astro-seo-schema can be a good alternative for users wanting this feature right now.

@HiDeoo HiDeoo added the enhancement New feature or request label Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants