Skip to content

feat(astro): override components to support HeadTags #375

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

Merged
merged 13 commits into from
Oct 16, 2024

Conversation

eric-burel
Copy link
Contributor

I was investigating setting up a sitemap, using @astrojs/sitemap.
For a proper setup, you also want to add a link tag in the page head to tell scrapers the URL to your sitemap (in addition to robot.txt). We could do this in the framework default setup, but that would mean setting up sitemap as an integration there and I'd rather give end users more control on the configuration.

So I went down the rabbit hole and implemented a replaceable HeadTags component.

I've tried to make the API as future proof as possible using slots.

Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@eric-burel eric-burel changed the title Custom HeadTags feat: Custom HeadTags Oct 15, 2024
@AriPerkkio AriPerkkio changed the title feat: Custom HeadTags feat(astro): override components to support HeadTags Oct 16, 2024
Copy link
Member

@AriPerkkio AriPerkkio left a comment

Choose a reason for hiding this comment

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

This is perfect, thanks @eric-burel! 🤩
Nice to see test cases, docs and everything in place in the PR!

We are planning to do 1.1.0 release later this week. This feature will be part of that.

@AriPerkkio AriPerkkio merged commit e93d11a into stackblitz:main Oct 16, 2024
10 checks passed
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.

2 participants