Skip to content

Commit

Permalink
Use relative path in layouts/home.html (#7693)
Browse files Browse the repository at this point in the history
It seems much simpler than the current approach, and it avoids
hardcoding the `/cvat` prefix.
  • Loading branch information
SpecLad authored Mar 28, 2024
1 parent dcbff88 commit f855531
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion site/build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
6 changes: 1 addition & 5 deletions site/layouts/home.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
{{ $version_rel_url := os.Getenv "HUGO_VERSION_REL_URL" }}
{{ if not $version_rel_url }}
{{ $version_rel_url = "/cvat/docs" }}
{{ end }}
<meta http-equiv="refresh" content="0; URL={{ $version_rel_url }}">
<meta http-equiv="refresh" content="0; URL=docs">
</head>
</html>

0 comments on commit f855531

Please sign in to comment.