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

feat: Added getStructuredDataScript util #4

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ambroisemaupate
Copy link
Member

No description provided.

utils/structured-data.ts Outdated Show resolved Hide resolved
utils/structured-data.ts Outdated Show resolved Hide resolved
utils/structured-data.ts Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

The plugin will be automatically loaded and executed by Nuxt. Even if we don't need it. I think plugin into layer is a bit tricky. Maybe we should use a module for this kind of thing? Like a Nuxt module @rezo-zero/nuxt-cache-control who injects the plugin? Another solution would be to nest the plugin into a folder like plugins/cache/cache-controls (not auto loaded) and we could add it manually into the Nuxt config.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think a nuxt-module would be preferable.

Every project using a Cache Reverse-Proxy (Varnish, Cloudflare, Vercel) needs to define cache-control header on SSR responses.

@ambroisemaupate ambroisemaupate changed the title feat: Added CacheControl composable, server plugin and getStructuredDataScript util feat: Added getStructuredDataScript util Apr 19, 2024
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.

None yet

2 participants