From bba6b47dc269013e34edbb7201484a1357b6e214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Thu, 3 Sep 2026 17:26:20 +0300 Subject: [PATCH] docs: link documentation environments --- .../2026-09-03_cross_stand_links_on_indexes.md | 15 +++++++++++++++ TOOLS/docs-generator/internal/writers/writers.go | 11 ++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 HISTORY/2026-09-03_cross_stand_links_on_indexes.md diff --git a/HISTORY/2026-09-03_cross_stand_links_on_indexes.md b/HISTORY/2026-09-03_cross_stand_links_on_indexes.md new file mode 100644 index 0000000..56fa663 --- /dev/null +++ b/HISTORY/2026-09-03_cross_stand_links_on_indexes.md @@ -0,0 +1,15 @@ +# Cross-stand links on documentation index pages + +## Change + +The generated resource index now includes a short "Other environments" section with links to the DEV, TEST, and PROD documentation home pages. The links are added in `TOOLS/docs-generator/internal/writers/writers.go`, the actual source of `generated//docs/index.md`. + +## Publication + +All three profiles were regenerated and built sequentially. Only the resulting `index.html` was transferred to the corresponding active VM mirror: + +- `/var/www/tf-docs/nubes-dev/index.html` +- `/var/www/tf-docs/nubes-test/index.html` +- `/var/www/tf-docs/nubes/index.html` + +Each remote file was checked for the three cross-stand links. The regular S3 mirror continued to report `unexpected EOF`, so direct VM transfer was used again. \ No newline at end of file diff --git a/TOOLS/docs-generator/internal/writers/writers.go b/TOOLS/docs-generator/internal/writers/writers.go index d854b0d..b77a807 100644 --- a/TOOLS/docs-generator/internal/writers/writers.go +++ b/TOOLS/docs-generator/internal/writers/writers.go @@ -89,6 +89,11 @@ func IndexMD(docsDir string, specs []types.ServiceSpec) { var b bytes.Buffer b.WriteString("# Ресурсы провайдера\n\n") + b.WriteString("## Другие стенды\n\n") + b.WriteString("Основные страницы документации для проверки конфигураций на других стендах:\n\n") + b.WriteString("- [DEV](https://tf-docs.nodejsk8s.dev.nubes.ru/nubes-dev/) — разработка и интеграция.\n") + b.WriteString("- [TEST](https://tf-docs.nodejsk8s.dev.nubes.ru/nubes-test/) — тестирование перед PROD.\n") + b.WriteString("- [PROD](https://tf-docs.nodejsk8s.dev.nubes.ru/nubes/) — рабочий стенд.\n\n") order := []string{"Базы данных", "Очереди", "Хранилище", "K8s", "VMware", "Приложения", "Сеть", "Другие"} for _, cat := range order { @@ -1162,9 +1167,9 @@ func WriteNavFragment(docsDir string, specs []types.ServiceSpec) { b.WriteString(fmt.Sprintf(" - Выходные данные: %s_outputs.md\n", s.Name)) b.WriteString(fmt.Sprintf(" - Операции: %s_ops.md\n", s.Name)) b.WriteString(fmt.Sprintf(" - Пример: %s_example.md\n", s.Name)) -if hasCurated[s.Name] { -b.WriteString(fmt.Sprintf(" - 💡 Примеры из практики: curated/%s/pg_user_db.md\n", s.Name)) -} + if hasCurated[s.Name] { + b.WriteString(fmt.Sprintf(" - 💡 Примеры из практики: curated/%s/pg_user_db.md\n", s.Name)) + } } }