Skip to content

Commit 4755127

Browse files
Ajay-singh1craigbox
andcommitted
Stop generating drop-down in archive docs
Co-authored-by: Craig Box <[email protected]>
1 parent c7a634f commit 4755127

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

layouts/partials/version-selector.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{ if and (eq .Section "docs") (eq hugo.Environment "production") }}
12
{{ $versions := site.Data.versions }}
23
{{ $mainVerStr := $versions.main }}
34
{{ $preliminaryVerStr := $versions.preliminary }}
@@ -38,3 +39,4 @@
3839
</li>
3940
{{ end }}
4041
{{ end }}
42+
{{ end }}

scripts/archive_version.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ NUMBER=$(grep -w 'version:' data/args.yml | grep -oE '[^ ]+$' | tr -d '"')
2323
VERSION+="${NUMBER}"
2424

2525
rm -rf public/
26+
#set the Hugo environment to development for preventing production code in local builds
27+
export HUGO_ENVIRONMENT=development
2628
./scripts/gen_site.sh
2729
./scripts/build_site.sh /"${VERSION}"
2830

0 commit comments

Comments
 (0)