From 6abc84793d3a5a513ad76a59af3f06e25a3a9d0b Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Thu, 28 Mar 2024 13:08:38 +0200 Subject: [PATCH] Use relative path in layouts/home.html It seems much simpler than the current approach, and it avoids hardcoding the `/cvat` prefix. --- site/build_docs.py | 3 ++- site/layouts/home.html | 6 +----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/site/build_docs.py b/site/build_docs.py index 6a810ef605c0..d4720ad8b0e0 100755 --- a/site/build_docs.py +++ b/site/build_docs.py @@ -146,7 +146,8 @@ def run_hugo( run_hugo( output_dir / tag.name, - # Docsy doesn't forward the current version url to templates + # This variable is no longer needed by the current version, + # but it was required in v2.11.2 and older. extra_env_vars={VERSION_URL_ENV_VAR: f"/cvat/{tag.name}/docs"}, executable=hugo, ) diff --git a/site/layouts/home.html b/site/layouts/home.html index a1590cdde657..c4e8592c86fd 100644 --- a/site/layouts/home.html +++ b/site/layouts/home.html @@ -1,10 +1,6 @@ - {{ $version_rel_url := os.Getenv "HUGO_VERSION_REL_URL" }} - {{ if not $version_rel_url }} - {{ $version_rel_url = "/cvat/docs" }} - {{ end }} - + \ No newline at end of file