Skip to content

Commit fdbf7c9

Browse files
authored
Merge pull request #372 from ELIXIR-Belgium/search-config
Add ability to disable website search
2 parents f035bda + add963c commit fdbf7c9

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ theme_variables:
8585
# topnav:
8686
# theme: light
8787
# brand_logo: assets/img/main_logo.svg
88+
# search: true
8889
# github: true
8990
# twitter: false
9091
# bluesky: false

_includes/head.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@
5959
{% if page.toc or page.toc == nil %}<script src="{{ 'assets/js/toc.js' | relative_url }}?{{site.time | date: '%s'}}"></script>{% endif %}
6060
<script src="{{ 'assets/js/jquery.navgoco.js' | relative_url }}"></script>
6161
<script src="{{ 'assets/js/main.js' | relative_url }}?{{site.time | date: '%s'}}"></script>
62+
{%- unless site.theme_variables.topnav.search == false %}
6263
<script src="{{ 'assets/js/search.js' | relative_url }}"></script>
64+
{%- endunless %}
6365
<script src="{{ 'assets/js/clipboard.min.js' | relative_url }}"></script>
6466
{%- if page.datatable == true %}
6567
<!-- Include the standard DataTables bits -->

_layouts/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<body class="d-flex flex-column min-vh-100"{% if page.toc or page.toc == nil %} data-bs-spy="scroll" data-bs-target="#toc-contents" data-bs-smooth-scroll="true" tabindex="0"{% endif %}>
55
{% if site.topnav_banner %}{% include banner.html %}{% endif %}
66
{% if jekyll.environment == "development" and site.theme_variables.dev-info-banner == true %}{% include dev-info.html %}{% endif %}
7-
{% include topnav.html %}
7+
{% include topnav.html search=site.theme_variables.topnav.search %}
88
<!-- Page Content -->
99
<div class="container g-lg-5 flex-grow-1">
1010
<!-- Content Row -->

pages/documentation/configuring_theme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ theme_variables:
7070
topnav:
7171
theme: light
7272
brand_logo: assets/img/main_logo.svg
73+
search: true
7374
github: true
7475
twitter: false
7576
bluesky: false
@@ -108,6 +109,7 @@ More detailed information about these settings can be found here:
108109
* **topnav**: Settings related to the top navigation.
109110
* `theme`: This variable is needed to change between a dark and a light top navigation. possible values: *dark* and *light*
110111
* `brand_logo`: Custom path towards the brand logo, in case the assets/img/main_logo.svg can not be used.
112+
* `search`: Enable or disable the appearance of the search bar. Default: *true*
111113
* `github`: Enable or disable the appearance of the Github repo nav link. Default: *true*
112114
* `twitter`: Enable or disable the appearance of the Twitter nav link by adding the url towards the twitter page. Default: *false*
113115
* `bluesky`: Enable or disable the appearance of the Bluesky nav link by adding the url towards the Bluesky page. Default: *false*

0 commit comments

Comments
 (0)