Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSarah German <sgerman@gitlab.com>2022-08-18 18:02:30 +0300
committerMarcel Amirault <mamirault@gitlab.com>2022-08-18 18:02:30 +0300
commitab74a97edcc8a2c366cc68ffa2c5434fb32df423 (patch)
tree8684d88d9b5d1a4b335d7bb2638242313463f60e /lib
parent5a2916f6bcdf04f06376213c2e6435f5b44aaae1 (diff)
Add Lunr.js index script
Diffstat (limited to 'lib')
-rw-r--r--lib/helpers/generic.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/helpers/generic.rb b/lib/helpers/generic.rb
index 1f7a091c..5db5f02f 100644
--- a/lib/helpers/generic.rb
+++ b/lib/helpers/generic.rb
@@ -53,5 +53,12 @@ module Nanoc::Helpers
def show_banner?
@items['/_data/banner.yaml'][:show_banner]
end
+
+ #
+ # Check if this environment is set to run Algolia search.
+ #
+ def algolia?
+ ENV['ALGOLIA_SEARCH'] == "true"
+ end
end
end