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

[DEV-1279][DEV-1996][DEV-1997] Generate sitemap xml of the site #1277

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

tommaso1
Copy link
Collaborator

@tommaso1 tommaso1 commented Dec 17, 2024

List of Changes

Add sitemap.xml to website

Motivation and Context

Search engines will read this file to crawl the Developer Portal site more efficiently.

How Has This Been Tested?

Screenshots (if appropriate):

Screenshot 2024-12-17 at 11 49 00

Types of changes

  • Chore (nothing changes by a user perspective)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

- Implemented a new sitemap.ts file to generate a sitemap for the Next.js website.
- Integrated dynamic paths for guides, case histories, products, and API routes.
- Defined base, auth, profile, and guide routes with appropriate metadata including last modified date, change frequency, and priority.
- Enhanced SEO by providing structured URLs for various site sections.
Copy link

changeset-bot bot commented Dec 17, 2024

🦋 Changeset detected

Latest commit: b606bc2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
nextjs-website Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tommaso1 tommaso1 changed the title [DEV-1279][DEV-1996] Generate sitemap xml of the site [DEV-1279][DEV-1996][DEV-1997] Generate sitemap xml of the site Dec 18, 2024
@tommaso1
Copy link
Collaborator Author

Add NEXT_PUBLIC_BASE_URL to .env for referncing sitemap on robots

apps/nextjs-website/.env.default Outdated Show resolved Hide resolved
apps/nextjs-website/src/app/robots.ts Outdated Show resolved Hide resolved
apps/nextjs-website/src/app/sitemap.ts Show resolved Hide resolved
apps/nextjs-website/src/app/sitemap.ts Outdated Show resolved Hide resolved
Comment on lines 108 to 110
}));

return [
Copy link
Collaborator

Choose a reason for hiding this comment

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

Many pages are missing from the sitemap:

  • solution list page
  • the solution preview pages
  • the solution details pages
  • the webinar list page
  • the webinars pages
  • the guide pages
  • the tutorial pages (tutorials/come-utilizzare-correttamente-servizi-e-messaggi-in-app-io)
  • the guide and tutorial subpages
  • etc.

Copy link
Collaborator

Choose a reason for hiding this comment

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

image

There is something wrong with:

  • links to tutorial pages <loc>https://dev.developer.pagopa.it/app-io/tutorials/[object Object]</loc>
  • links to guide pages, which link to the main page of each guide several times
  • links to guide pages, where the link is malformed (the prefix is ​​repeated twice) as you can see in this example /app-io/guides//app-io/guides

apps/nextjs-website/.env.default Outdated Show resolved Hide resolved
Copy link
Collaborator

@marcobottaro marcobottaro left a comment

Choose a reason for hiding this comment

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

You should resolve this comment

...webinarRoutes,
...solutionRoutes,
...solutionsDetailRoutes,
...sectionRoutes,
Copy link
Collaborator

@marcobottaro marcobottaro Jan 9, 2025

Choose a reason for hiding this comment

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

terms-of-service is missing and i'm not sure about publishing auth and profile's routes

…structures for tutorials and guides. This enhances the sitemap's accuracy and SEO by providing cleaner, more structured URLs.
Copy link
Contributor

Branch is not up to date with base branch

@tommaso1 it seems this Pull Request is not updated with base branch.
Please proceed with a merge or rebase to solve this.

Co-authored-by: Marco Ponchia <[email protected]>
Copy link
Contributor

github-actions bot commented Jan 14, 2025

Jira Pull Request Link

This Pull Request refers to the following Jira issue DEV-1279

Copy link
Contributor

Bundle not found for branch main.
It wasn't possible to compare bundles size.

Copy link
Collaborator

@marcobottaro marcobottaro left a comment

Choose a reason for hiding this comment

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

add tos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants