From Kapa feedback: restore site search, remove Kapa search, move button (#3459)

This commit is contained in:
Deborah Barnard
2025-08-08 14:16:44 +01:00
committed by GitHub
parent b4b1756a10
commit 2a561b1463
6 changed files with 32 additions and 28 deletions

View File

@@ -47,7 +47,6 @@ https://plausible.io/docs/script-extensions?ref=ryansechrest.com#all-our-script-
{% endblock %}
{% block container %}
<!-- Google Tag Manager (noscript) -->

View File

@@ -113,9 +113,32 @@
</div>
{% endif %}
<!-- n8n CUSTOM: fully remove search from header. It should be
disabled due to config, but making sure.
-->
<!-- n8n CUSTOM: Kapa -->
<button
class="n8n-kapa-button"
onclick="window.Kapa.open({
mode: 'ai'
})"
type="button"
>
<span class="md-search__icon md-icon">{% set icon = "material/creation" %}{% include ".icons/" ~ icon ~ ".svg" %}</span><span class="n8n-search-text">Chat with the docs</span>
</button>
<!-- Button to open search modal -->
{% if "material/search" in config.plugins %}
{% set search = config.plugins["material/search"] | attr("config") %}
<!-- Check if search is actually enabled - see https://t.ly/DT_0V -->
{% if search.enabled %}
<label class="md-header__button md-icon" for="__search">
{% set icon = config.theme.icon.search or "material/magnify" %}
{% include ".icons/" ~ icon ~ ".svg" %}
</label>
<!-- Search interface -->
{% include "partials/search.html" %}
{% endif %}
{% endif %}
<!-- Repository information -->
<!-- n8n CUSTOM: don't show GitHub link -->

View File

@@ -53,21 +53,10 @@
</label>
<!-- n8n CUSTOM: don't show repo link -->
<!-- Repository information -->
<!-- Navigation list -->
<ul class="md-nav__list" data-md-scrollfix>
<!-- n8n CUSTOM: replace search with Kapa -->
<button
class="n8n-kapa-button"
onclick="window.Kapa.open({
mode: 'ai'
})"
type="button"
>
<span class="md-search__icon md-icon">{% set icon = "material/magnify" %}{% include ".icons/" ~ icon ~ ".svg" %}</span><span class="n8n-search-text">Search with AI</span>
</button>
{% for nav_item in nav %}
{% set path = "__nav_" ~ loop.index %}
{{ item.render(nav_item, path, 1) }}