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

Feature/f 157 improve seo and metadata on each page #144

Merged
merged 6 commits into from
Dec 18, 2024

Conversation

Esoteriker
Copy link
Collaborator

@Esoteriker Esoteriker commented Dec 17, 2024

SEO and Metadata Enhancements:

  • src/app/about/layout.tsx, src/app/data_sources/layout.tsx, src/app/download-portal/layout.tsx, src/app/wiki/layout.tsx: Updated metadata to include dynamic titles, descriptions, keywords, OpenGraph, and Twitter card information using siteConfig. [1] [2] [3] [4]
  • src/app/layout.tsx: Added JSON-LD structured data for better search engine understanding.

Sitemap and Robots.txt Integration:

  • next-sitemap.config.js: Added configuration for generating sitemap and robots.txt with daily change frequency and priority settings.

We have to also exclude some pages in sitemap config (tbd). @marinovl7
- Internal pages (e.g. /admin maybe, I'm not sure if we have plan to have admin page).
- Test pages.
- Pages with no SEO value

  • public/sitemap.xml: Added sitemap with URLs for various pages, including change frequency and priority.
  • public/robots.txt: Added robots.txt to allow all user agents and specify the sitemap location.

Package and Configuration Updates:

  • package.json: Added next-sitemap as a dependency and included a postbuild script to generate the sitemap after building the project. [1] [2]

To be noticed yarn postbuild must excuted after yarn build, otherwise sitemap.xml cannot be made correctly

  • src/config/site.ts: Updated siteConfig to include keywords and domain information for use in metadata and SEO configurations. [1] [2]

  • domain of this website need to be confirmed, so that we can modify robots.txt
  • one thing to be checked in vercel deploy if there is noindex tag? lead to no high score in lighthouse
    @Tschonti @marinovl7 Please give some feedbacks regarding what I have done, since some points I'm also not sure
Screenshot 2024-12-17 at 22 15 40

Copy link

netlify bot commented Dec 17, 2024

Deploy Preview for wfp-hungermap ready!

Name Link
🔨 Latest commit da359c8
🔍 Latest deploy log https://app.netlify.com/sites/wfp-hungermap/deploys/6761e5de4c7dff000829b31f
😎 Deploy Preview https://deploy-preview-144--wfp-hungermap.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Esoteriker Esoteriker marked this pull request as ready for review December 17, 2024 21:20
@Tschonti
Copy link
Collaborator

netlify adds the x-robots-tag to every preview deployment to make sure that they do not show up in searches. This is of course not added to the prod deployment, so it'll be fine once we merge

Copy link
Collaborator

@marinovl7 marinovl7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Crazy! Awesome job Haidong!

@marinovl7 marinovl7 merged commit 327e5c9 into main Dec 18, 2024
5 checks passed
@marinovl7 marinovl7 deleted the feature/f-157-improve-seo-and-metadata-on-each-page branch December 18, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants