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

Ha en søkemotor-tilgjengelig nettside for økt synlighet #555

Closed
6 tasks done
mathiazom opened this issue Sep 2, 2024 · 12 comments
Closed
6 tasks done

Ha en søkemotor-tilgjengelig nettside for økt synlighet #555

mathiazom opened this issue Sep 2, 2024 · 12 comments
Assignees
Labels
bug Something isn't working Goal

Comments

@mathiazom
Copy link
Contributor

mathiazom commented Sep 2, 2024

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:

  • Søkemotorer
  • Sosiale medier (Linkedin, Facebook, Slack) via OpenGraph

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:

  • Sider skal være crawlable av søkemoterer.
  • Det skal være mulig å sette metadata via CMS som er spesifikk per innhold: tittel, description, keywords.
  • Dersom metadata ikke er satt på spesifikk innholdsside, skal det være en god default som vises i stedet.
  • Innholdssider lenket til via LinkedIn (et.al) skal vise egen definert innhold styrt fra CMS om tilgjengelig
  • Om ikke spesifikk innhold til OpenGraph er tilgjengelig skal standard-innhold vises.
  • Bilder til OpenGraph skal være 1,200 x 630 px
  • Skal ha tilgjengelig sitemap.xml
@mikaelbr
Copy link
Member

mikaelbr commented Sep 2, 2024

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

@mathiazom mathiazom moved this to In progress in Nye nettsider Sep 2, 2024
@christinaroise
Copy link
Contributor

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

@mathiazom
Copy link
Contributor Author

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

@mikaelbr
Copy link
Member

mikaelbr commented Sep 4, 2024

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.

@mikaelbr
Copy link
Member

mikaelbr commented Sep 4, 2024

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

@mathiazom
Copy link
Contributor Author

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?

@mikaelbr
Copy link
Member

mikaelbr commented Sep 4, 2024

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.

@mikaelbr
Copy link
Member

mikaelbr commented Sep 9, 2024

Avhengig av språk. Scopes til senere

@github-project-automation github-project-automation bot moved this from In progress to Done in Nye nettsider Sep 11, 2024
@mikaelbr mikaelbr reopened this Sep 16, 2024
@mikaelbr
Copy link
Member

https://v3.variant.no/sitemap.xml show wrongs URLs.

@mikaelbr mikaelbr closed this as completed by moving to Done in Nye nettsider Sep 16, 2024
@mikaelbr mikaelbr reopened this Sep 16, 2024
@mathiazom
Copy link
Contributor Author

Should look into making the sitemap dynamic (generate per request, not at build)

https://github.com/iamvishnusankar/next-sitemap?tab=readme-ov-file#server-side-sitemap-getserversidesitemap

@mathiazom
Copy link
Contributor Author

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

@Likuh Likuh added the bug Something isn't working label Sep 20, 2024
@Likuh Likuh closed this as completed by moving to Done in Nye nettsider Sep 20, 2024
@mathiazom
Copy link
Contributor Author

Some bugs that need to be fixed: #693, #694

@mathiazom mathiazom moved this from Done to In progress in Nye nettsider Sep 20, 2024
@mathiazom mathiazom reopened this Sep 20, 2024
@christinaroise christinaroise moved this from In progress to Done in Nye nettsider Sep 23, 2024
@christinaroise christinaroise closed this as completed by moving to Done in Nye nettsider Sep 23, 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 Goal
Projects
Status: Done
Development

No branches or pull requests

4 participants