Загрузка...

Kubernetes.io redirects management tool (what is and how to)

Introducing gen-redirects.py, a semi-automated tool for managing the redirection of pages on the official kubernetes.io documentation website. (what is it / how to use) - https://github.com/kubernetes/website - https://kubernetes.io The tool was developed by myself as a Kubernetes contributor and Kubernetes SIG-Docs Localization Subproject co-Lead. In the kubernetes/website repository that serves kubernetes.io, when previously provided pages disappear, they are redirected to new documents. These redirects are listed in a file named "_redirects", and currently, there are around 400 entries. There are some issues with this _redirects file. 1) Some redirects lead to incorrect or non-existent links, and these are not being properly managed. 2) Kubernetes documentation is localized in more than 10 languages, but these redirects hardly address links in localized languages. Managing this has become a significant challenge. Due to the syntax of _redirects, wildcard handling is difficult. 3) Additionally, there are problems like the list not being sorted, and there's no policy on when to stop a particular redirect. Therefore, the proposed Python program verifies the content of the redirects, regenerates them according to localization, and automatically creates the _redirects. 1) It checks the list of redirects for inaccessible URLs and ensures that contributors only provide accessible addresses. 2) If redirects for English are added, it automatically generates redirects for other languages, ensuring that future localization contributors don't have to worry about redirects.

Видео Kubernetes.io redirects management tool (what is and how to) автора Кодерский Гид
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки