feat: add redirect processing script

This commit is contained in:
Michael Zetterberg
2025-05-21 13:24:08 +02:00
parent e2a4fa6c07
commit c52da4bec6
7 changed files with 171 additions and 0 deletions

View File

@@ -6,3 +6,20 @@ This function will be called by the `web` app's middleware to check if the incom
The "source of truth" for which URLs should be redirected where will be provided by the SEO team and put in a JSON file within this app.
If no match for the incoming request is found, the request is passed on through the middleware.
## Update the redirects from the source
The Excel source file used is located at:
https://scandichotelsab.sharepoint.com/:x:/s/921-ContentNewweb/ETGStOQAARtJhJXG9dy8ijYBccpmKhLVjS2SF_2E69QrAQ
- Open it
- Each domain/language has its own sheet
- Export each sheet into their respective language code
- File > Export > Download as CSV UTF-8
- Save as [lang].csv in `./scripts/csv` folder
- Run the `update` script target
- E.g. `yarn workspace @scandic-hotels/scandic-redirect update`
- Commit and push the JSON files in `./netlify/functions/data`.
- Create a PR
- Profit!