From 1ed604eb1a22d421d708129a5adc932c455aba59 Mon Sep 17 00:00:00 2001 From: heavy-d Date: Sun, 31 Aug 2025 19:28:56 +0200 Subject: [PATCH] docs: integrate search into header --- docs/_layouts/default.html | 94 ++++++++++++++++++++++++++++++++++++++ docs/search.json | 14 ++++++ 2 files changed, 108 insertions(+) create mode 100644 docs/_layouts/default.html create mode 100644 docs/search.json diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html new file mode 100644 index 000000000..777b0106e --- /dev/null +++ b/docs/_layouts/default.html @@ -0,0 +1,94 @@ + + + + + + + + {% seo %} + + + {% include head-custom.html %} + + + +
+
+

{{ site.title | default: site.github.repository_name }}

+ + {% if site.logo %} + Logo + {% endif %} + +

{{ site.description | default: site.github.project_tagline }}

+ + {% if site.github.is_project_page %} +

View the Project on GitHub {{ site.github.repository_nwo }}

+ {% endif %} + + {% if site.github.is_user_page %} +

View My GitHub Profile

+ {% endif %} + + {% if site.show_downloads %} + + {% endif %} + +
+ +
    +
    +
    +
    + + {{ content }} + +
    + +
    + + + + + diff --git a/docs/search.json b/docs/search.json new file mode 100644 index 000000000..1fb40fd17 --- /dev/null +++ b/docs/search.json @@ -0,0 +1,14 @@ +--- +layout: null +--- +[ + {% for page in site.pages %} + {% if page.url != '/search.json' %} + { + "title": {{ page.title | jsonify }}, + "url": {{ page.url | relative_url | jsonify }}, + "content": {{ page.content | strip_html | strip_newlines | jsonify }} + }{% unless forloop.last %},{% endunless %} + {% endif %} + {% endfor %} +]