Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

Commit d5565c2

Browse files
authored
Set JEKYLL_ENV environment variable for Netlify builds (#267)
1 parent 63077ec commit d5565c2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

_includes/topnav.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
{%- else -%}
2020
{%- assign version_number = v.version.name -%}
2121
{%- endif -%}
22-
{%- if v.version.tag -%}
22+
{%- if v.version.tag and jekyll.environment != "netlify" -%}
2323
{%- assign version_alias = v.version.tag -%}
2424
{%- else -%}
2525
{%- assign version_alias = v.version.name -%}

_layouts/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<script type="text/javascript">
1414
var availableVersions = [
1515
{%- for v in page.versions -%}
16-
{%- if v.version.tag -%}
16+
{%- if v.version.tag and jekyll.environment != "netlify" -%}
1717
{%- assign version_alias = v.version.tag -%}
1818
{%- else -%}
1919
{%- assign version_alias = v.version.name -%}

netlify.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
jekyll build
5+
JEKYLL_ENV="netlify" jekyll build
66
ruby sitemap.rb
77
rm -rf htmltest
88
mkdir -p htmltest

0 commit comments

Comments
 (0)