Skip to content

Resolve "Localization of blog categories and URLs"

Step 1: What is changing in this MR?

  • Adds multiple rsync commands to upload our blog localized content folders, into our root GCP bucket, and adds folder exception for default rsync transfer of html/xml files

Exclusion pattern :".*\.(?!html$|xml$)[^\.]*$|fr-fr/(.*html$|.*xml$)|de-de/(.*html$|.*xml$)|ja-jp/(.*html$|.*xml$)"

Source GCP Destination
dist/blog/de-de de-de/blog
dist/blog/fr-fr fr-fr/blog
dist/blog/ja-jp ja-jp/blog
  • JS and CSS files maintain the same paths for practicality e.g:
Source Destination
dist/_nuxt/static/1715199539/fr-fr/2012/06/20/gitlab-wallpaper/state.js /blog/_nuxt/static/1715188010/fr-fr/2012/06/20/gitlab-wallpaper/state.js
  • Adds blog path exception to BE repo and WWW repo

Testing

This change was tested first using the -n flag to perform a dry run, and removing it after confirming all files were copied or ignored from the desired folders. To test /blog repo files are not deleted on WWW, an MR using the same GCP_BUCKET path was created, and a blog path exception was added to ignore everything matching blog files with: -x '^.*blog[/\\]'.

There's no risk of deleting BE files due to our transfer being performed to subfolders/ paths instead of the root bucket e.g: $GCP_BUCKET/ja-jp/blog

Production Review app
https://about.gitlab.com/blog/fr-fr/2012/06/20/gitlab-wallpaper/ https://153-localization-of-blog-categories-and-urls.about.gitlab-review.app/fr-fr/blog/2012/06/20/gitlab-wallpaper/

Screenshot_2024-05-09_at_8.08.07_AM

Closes #153

Edited by Margareth Mañunga

Merge request reports