Install and configure next-seo

Description

Add the next SEO package and configure any basic global meta tags or metadata. Add OpenGraph data where appropriate.

See documentation on default SEO here:

Add any keywords that will help with SEO optimization: ICT4D, international development, digital transformation, sustainable development goals, SDGs, DPGs, digital public goods, GovStack, open source, digital infrastructure, building blocks, SDG digital investment framework

Implementation details

The default configuration sets plenty of default metatags:

  • default <title>: "DIAL Catalog of Digital Solutions" displayed in a selected language

    • used when there is no <title> set for a particular page

  • title template: “<page title> | DIAL Catalog of Digital Solutions”

    • where:

      • <page title> is a <title> set for any page, i.e. “Products” for Products list page

      • "DIAL Catalog of Digital Solutions" is displayed in a selected language

    • example for Products list page:

      • “Products | DIAL Catalog of Digital Solutions"

  • description: “An interactive online resource to support Global Development Actors in the implementation of digital strategies.” displayed in a selected language

  • favicon (icon displayed next to page title in a browser tab): favicon.ico

  • Open Graph tags (used when a link to the app is shared in social media):

    • title displayed in a language corresponding to the link shared, i.e. for:

      • - English (default): “DIAL Catalog of Digital Solutions"

      • - Spanish: “Catálogo DIAL de

        soluciones digitales”

    • description displayed in a language corresponding to the link shared, i.e. for:

      • - English (default): “An interactive online resource to support Global Development Actors in the implementation of digital strategies.”

      • - Spanish: “Un recurso interactivo en línea para apoyar a los actores del desarrollo global en la implementación de estrategias digitales.”

    • images which is an array of card images - set by default to a single image: images/hero-image/hero-image.png

    • the result of the following defaults corresponding to the link shared, i.e. for:

      • - English (default)

        • Facebook:

        • Twitter:

      • - Spanish

        • Facebook:

        • Twitter:

    • url (NOT defined) - once this is merged and deployed on dev server I will check if this tag has to be defined for each and every page to correctly redirect user to the page.

Tips for using next-seo plugin

  • Documentation:

  • Adding metatags to a page:

    • to set: title and description, possibly also Open Graph url - to be confirmed

  • Testing Open Graph and Twitter tags on localhost:

  • Testing metatags on Facebook:

  • Testing metatags on Twitter: https://cards-dev.twitter.com/validator

  • Testing metadata on localhost:

Attachments

6

Activity

Rafał Stencel 
August 4, 2022 at 4:37 PM
(edited)

I tried to use that tool, even linked to it in the description, however it does not work as expected. What I did is I used the Google Chrome extension to temporarily make metatags of a single localhost page accessible over Internet and then pasted a link to it into a draft post on Facebook and Twitter. Even without posting this post on Facebook and Twitter I could already see the cards which I then attached to the description.

Nyoman Ribeka 
August 4, 2022 at 3:28 PM

Maybe we can try pulling the twitter card with this page?

https://cards-dev.twitter.com/validator

Steve Conrad 
August 4, 2022 at 3:22 PM

- this looks good. Glad to see all of those <head> tags go away.

Rafał Stencel 
August 4, 2022 at 2:02 PM

take a look at https://gitlab.com/dial/online-catalog/catalog-front/-/merge_requests/254 - if it’s merged I can move on with .

Rafał Stencel 
August 4, 2022 at 1:51 PM

the screenshots I put in the comment below is the current look of the card. Once my changes are introduced the description will be as on screenshots in the description (= “An interactive…”).

Unresolved

Details

Assignee

Reporter

Original estimate

Time tracking

1d 2h logged

Sprint

Priority

Created July 19, 2022 at 3:46 PM
Updated April 30, 2024 at 5:53 PM