Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

235
Visualizações
Gatsby Link absolute path

By using Link component in Gatsby.js I will not be able to directed by clickin on a link to back to previous urls , e.g: I have this url site.com/article/id let's say I am in the id page , so in this case when I use Link I will not be able to go to site.com/article/id2 but instead I will be only be able to go site.com/article/id/article/id2 . How to fix this ?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You just need to add a slash (/) the beginning of the to prop:

<Link to={`/${someSlugVar}`} />Click me</Link>

Otherwise, it concatenates the new slug to the current one because of the relativity of the paths. In the end, it behaves like a normal anchor so the approach is exactly the same (your issue will also happen using a normal <a>).

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda