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

Sitemaps dinâmicos #797

Closed
wants to merge 4 commits into from
Closed

Sitemaps dinâmicos #797

wants to merge 4 commits into from

Conversation

r3nanp
Copy link

@r3nanp r3nanp commented Oct 30, 2022

Add config and dependency to handle dynamic sitemaps.

Why use sitemaps on the website:
https://developers.google.com/search/docs/crawling-indexing/sitemaps/overview

Next-sitemap lib:
https://www.npmjs.com/package/next-sitemap

Issues:
#796
#493

@r3nanp r3nanp added the novo recurso Nova funcionalidade/recurso label Oct 30, 2022
@r3nanp r3nanp self-assigned this Oct 30, 2022
@vercel
Copy link

vercel bot commented Oct 30, 2022

@r3nanp is attempting to deploy a commit to the TabNews Team on Vercel.

To accomplish this, @r3nanp needs to request access to the Team.

Afterwards, an owner of the Team is required to accept their membership request.

If you're already a member of the respective Vercel Team, make sure that your Personal Vercel Account is connected to your GitHub account.

@r3nanp r3nanp closed this by deleting the head repository Nov 21, 2022
@r3nanp r3nanp changed the title Add dynamic sitemaps Sitemaps dinâmicos Nov 21, 2022
@aprendendofelipe aprendendofelipe marked this pull request as draft December 9, 2022 11:44
Copy link
Collaborator

@aprendendofelipe aprendendofelipe left a comment

Choose a reason for hiding this comment

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

@r3nanp, tudo bem?

Deixei algumas dúvidas e considerações. Se puder, dê uma analisada.

Obrigado 🤝

import { getServerSideSitemap } from 'next-sitemap';

/** @type {import('next').GetServerSideProps} */
export async function getServerSideProps(ctx) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oi @r3nanp, muito legal essa contribuição!

Aí vão minhas dúvidas e considerações:

  • Será que faz sentido e daria para utilizar com páginas estáticas usando getStaticProps?
  • Se eu entendi direito, está adicionando somente os 30 conteúdos da primeira página de relevantes. Será que isso não vai prejudicar o SEO ao invés de ajudar? Seria legal adicionar bem mais conteúdos. Além de adicionar as outras páginas que não são conteúdos.
  • Você está passando content.slug como loc. Será que o correto não seria passar `/${content.owner_username}/${content.slug}`?
  • O formato da data que está sendo passada para lastmod está correto? Só estou perguntando por desencargo, pois eu não verifiquei.
  • Deixe fixa a versão das bibliotecas utilizadas: "next-sitemap": "3.1.29"

Bom trabalho!

@aprendendofelipe
Copy link
Collaborator

Fechando o PR por inatividade 🤝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
novo recurso Nova funcionalidade/recurso
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants