Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/assembler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ environments:
feature_flags:
LAZY_LOAD_NAVIGATION: true
SEARCH_OR_ASK_AI: true
STAGING_ELASTIC_NAV: true
dev:
uri: http://localhost:4000
content_source: current
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ public bool SearchOrAskAiEnabled
set => _featureFlags["search-or-ask-ai"] = value;
}

public bool StagingElasticNavEnabled
{
get => IsEnabled("staging-elastic-nav");
set => _featureFlags["staging-elastic-nav"] = value;
}

private bool IsEnabled(string key)
{
var envKey = $"FEATURE_{key.ToUpperInvariant().Replace('-', '_')}";
Expand Down
7 changes: 6 additions & 1 deletion src/Elastic.Documentation.Site/Layout/_Header.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
{
<div id="elastic-nav-wrapper">
<div id="elastic-nav" hx-disable="true"></div>
<script src="https://www.elastic.co/elastic-nav.js" async></script>
@{
var elasticNavUrl = Model.Features.StagingElasticNavEnabled
? "https://stag-www.elastic.co/elastic-nav.js"
: "https://www.elastic.co/elastic-nav.js";
}
<script src="@elasticNavUrl" async></script>
</div>
@await RenderPartialAsync(_SecondaryNav.Create(Model))
}
Expand Down
Loading