Closed mathiazom closed 1 month ago
Additionally, OpenGraph metadata should be set correctly and individually for each page.
Should also consider generating individual preview images for Open Graph. See example: https://github.com/varianter/handbook/blob/main/pages/api/og-search.tsx
For preview images, sanity is backing and contributing to this plugin: https://www.sanity.io/plugins/asset-source-ogimage and vercel has this as an option: https://vercel.com/docs/functions/og-image-generation
All pages have the SEO object added. It will and is added to new pages as we create them as schemas
For preview images, sanity is backing and contributing to this plugin: https://www.sanity.io/plugins/asset-source-ogimage
That plugin does not work with Sanity Studio v3, and is no longer maintained.
Here is a v3 fork we could use: https://www.sanity.io/plugins/og-image-generator-plugin
But also, not all roads lead to Sanity. There are possible futures where sites and subsites exsists outside the realm of Sanity. So a solution generic as preview images I don't think needs to be tightly coupled to the CMS.
I think this is a good general rule, to always consider "what should or needs to be part of the CMS", to avoid putting all our eggs into the Sanity basket just by deafult frame of mind
Should also consider generating individual preview images for Open Graph. See example: https://github.com/varianter/handbook/blob/main/pages/api/og-search.tsx
What was the reason for not using @vercel/og
, but just Satori directly? To support the Node runtime?
In this case it was quick and dirty reuse of something that was running in a docker container (thus not edge as you imply). So that judgement call does not automatically apply to this case.
Avhengig av språk. Scopes til senere
https://v3.variant.no/sitemap.xml show wrongs URLs.
Should look into making the sitemap dynamic (generate per request, not at build)
Sitemap has now been set to generate per request in order to keep the urls fresh. Since this is a fairly naive approach, an issue has been created to create a more performant solution: #650
Some bugs that need to be fixed: #693, #694
Bakgrunn og behov
For å kunne være godt synlig via søk, må vi legge tilrette for god crawling og indeksering fra tjenester. Innhold er som alltid viktigst, men for dette behovet tenker vi på innhold som separat oppgave. Dvs. vi trenger ikke vite hva innholdet skal være, men vi må legge tilrette for at SEO, crawling, preview fungerer bra.
Det er viktig å ta høyde for ulike løsninger som kan referere til innhold:
Dersom innhold på siden har featured bilde, burde det vises som bilde til OpenGraph i rett utsnitt (1,200 x 630 px). Det burde være mulig å velge preview-bilde til OpenGraph via metadata i CMS.
Definisjon av Metadata burde være konsekvent på tvers av innhold, enten det er "pages", eller ting som bloggposter, nyheter, kalkulator, ansattoversikt, osv.
Akseptansekriterier: