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

fix: lastmod is not being set correctly #362

Open
besfir opened this issue Sep 17, 2024 · 2 comments
Open

fix: lastmod is not being set correctly #362

besfir opened this issue Sep 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@besfir
Copy link

besfir commented Sep 17, 2024

🐛 The bug

  • In the development environment, lastmod can be set using route rules, but it cannot be set using useSeoMeta.
  • In the development environment, lastmod cannot be set for the root path even using route rules.
  • When pre-rendering, lastmod cannot be set using useSeoMeta, defineRouteRules, or routeRules.

🛠️ To reproduce

https://stackblitz.com/edit/nuxt-starter-h5dy6h?file=nuxt.config.ts

🌈 Expected behavior

  • The articleModifiedTime property of useSeoMeta should also be able to set lastmod in dev env.
  • For the root path, there should be at least one way to set lastmod in dev env.
  • When pre-rendering, at least one of useSeoMeta, defineRouteRules, or routeRules should work to set lastmod.

ℹ️ Additional context

No response

@besfir besfir added the bug Something isn't working label Sep 17, 2024
@besfir
Copy link
Author

besfir commented Sep 17, 2024

I updated content because lastmod cannot be set at all when pre-rendering.

@harlan-zw
Copy link
Collaborator

harlan-zw commented Sep 20, 2024

Hey, thanks for the issue. In terms of what's supported:

  • useSeoMeta: It's not possible to show any content that needs to be extracted from the HTML in dev. Found a bug with the prerendering currently investigating this.
  • Inline route rules: Within development Nitro does not return these so we can't use them, unfortunately. We should make an issue upstream to track.
  • Nuxt config route rules: Bug on home page, have pushed up a fix... Thanks!

@harlan-zw harlan-zw reopened this Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants