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

Automatic robot.txt & sitemap.xml #382

Merged
merged 15 commits into from
Sep 23, 2024
Merged

Automatic robot.txt & sitemap.xml #382

merged 15 commits into from
Sep 23, 2024

Conversation

Suboyyy
Copy link
Contributor

@Suboyyy Suboyyy commented Sep 14, 2024

Automatic robot.txt & sitemap.xml

Changes

Adding robot.tsx and sitemap.tsx

What's left to do

  • Retirer les /page des liens car bien que le fichier s'appelle page.tsx, il est render sur le dossier
  • Revoir le système de génération des liens car il y a des trucs qui ne devraient pas être sur le sitemap (typiquement le fichier robots.ts passe sur le sitemap) et aussi tous les sous-dossiers ne sont pas affichés (ex: /admin/genbadge devient seulement /genbadge)
  • Ajouter weekly sur chaque url pour forcer un reload des moteurs de recherche toutes les semaines
  • Ne pas mettre les pages des dossiers (dashboard),oauth, reset et validate
  • Enfin, si possible, il faudrait ajouter une priorité (1.0) à chacun des liens avec :
    • 1.0 pour la route /
    • 0.8 pour les routes /tournaments/*
    • 0.5 pour le reste

@Suboyyy Suboyyy changed the title Create robots.txt Automatic robot.txt & sitemap.xml Sep 15, 2024
src/utils/api.ts Outdated
@@ -86,7 +86,7 @@ const requestAPI = (

// Set the authorization header with the given token for next requests
const getAuthorizationToken = () => {
return localStorage.getItem('utt-arena-token');
return typeof localStorage !== 'undefined' ? localStorage.getItem('utt-arena-token') : undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

Il y en a toujours besoin ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

non et si c'est utilisé on se retrouve dans données j'ai l'impression

src/app/sitemap.tsx Outdated Show resolved Hide resolved
src/app/sitemap.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@DevNono DevNono left a comment

Choose a reason for hiding this comment

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

à voir si tu arrives à utiliser l'API pour recup la liste des tournois quand même

@Suboyyy Suboyyy merged commit 1944e95 into dev Sep 23, 2024
3 checks passed
@Suboyyy
Copy link
Contributor Author

Suboyyy commented Sep 23, 2024

Keep the branch

Suboyyy added a commit that referenced this pull request Sep 26, 2024
* Create robots.txt

* Delete abomination

* Dynamical robots.txt but bug with sitemap.tsx

* sitemap.xml is automatically created but with scss paths

* only .tsx in sitemap

* url without /page

* changeFrequency = weekly

* Solving error

* It "works" but can't find tournament ids

* comment problem

* Why there is no tournaments??

* Sitemap works but tournamentId must be set by hand

* pnpm lint

* fix some errors

---------

Co-authored-by: Antoine Dufils <[email protected]>
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