nuxt-themes / alpine

The minimalist blog theme, powered by Nuxt & Markdown.
https://alpine.nuxt.space
MIT License
284 stars 57 forks source link

Canonical and og:url are not set #157

Closed galaxy79 closed 2 months ago

galaxy79 commented 11 months ago

I was trying to test the alpine theme and saw that canonical and og:url properties are missing in the generated html file.

image
Atinux commented 11 months ago

You can define them in your nuxt.config.ts @galaxy79 for og:url and og:type using https://nuxt.com/docs/api/configuration/nuxt-config#head

I guess for the canonical we could add it in our AppLayout @bdrtsky

galaxy79 commented 11 months ago

Thanks .. I did it.. since it was released as a theme and these are important parameters for SEO, I thought it is better to be raise the issue

galaxy79 commented 11 months ago

@Atinux i defined it in nuxt.config.ts and it works for the index page. For each blog page, it still has the canonical as by index page url and how can i dynamically update it for each page ?

deepinder10 commented 2 months ago

@Atinux I ran into the same issue as @galaxy79 . I have raised a PR to address it. https://github.com/nuxt-themes/alpine/pull/194