diff --git a/NEWS b/NEWS index 0bb12e95..e8fbbae4 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ there's now a whole reference section in the docs! Check it out: https://torsion.org/borgmatic/ * #1161: Fix a traceback (TypeError) in the "check" action with Python 3.14. + * Add documentation search. 2.0.9 * #1105: More accurately collect Btrfs subvolumes to snapshot. As part of this, the Btrfs hook no diff --git a/README.md b/README.md index b06fa830..f4c1e294 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,6 @@ title: borgmatic permalink: index.html --- - -## It's your data. Keep it that way. - borgmatic logo borgmatic is simple, configuration-driven backup software for servers and diff --git a/docs/Dockerfile b/docs/Dockerfile index 4379abb4..0b2d3eb4 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -28,6 +28,7 @@ COPY --from=borgmatic /command-line.txt /source/docs/_includes/borgmatic/command COPY --from=borgmatic /contributors.html /source/docs/_includes/borgmatic/contributors.html COPY . /source RUN NODE_ENV=${ENVIRONMENT} npx eleventy --input=/source/docs --output=/output +RUN npx -y pagefind --site /output FROM docker.io/nginx:1.26.1-alpine diff --git a/docs/_includes/header.njk b/docs/_includes/header.njk index c227f241..33ce9cec 100644 --- a/docs/_includes/header.njk +++ b/docs/_includes/header.njk @@ -5,4 +5,5 @@ {{ breadcrumb | eleventyNavigationToHtml | safe }}

{{ title | safe }}

+ {% if page.url == '/' %}

It's your data. Keep it that way.

{% endif %} diff --git a/docs/_includes/index.css b/docs/_includes/index.css index a81293da..a5c63539 100644 --- a/docs/_includes/index.css +++ b/docs/_includes/index.css @@ -548,3 +548,15 @@ main .elv-toc + h1 .direct-link { .mdi.mdi-content-copy { --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z'/%3E%3C/svg%3E"); } + +#search-entrance { + padding-bottom: 1em; +} + +#search-entrance form { + display: inline-block; +} + +#search { + padding-top: 1em; +} diff --git a/docs/_includes/layouts/base.njk b/docs/_includes/layouts/base.njk index 994598a0..1982caaa 100644 --- a/docs/_includes/layouts/base.njk +++ b/docs/_includes/layouts/base.njk @@ -5,7 +5,7 @@ - borgmatic - {{ subtitle + ' - ' if subtitle}}{{ title }} + borgmatic{% if subtitle or title %} - {% endif %}{{ subtitle + ' - ' if subtitle}}{{ title }} {%- set css %} {% include 'index.css' %} {% include 'components/lists.css' %} diff --git a/docs/_includes/layouts/main.njk b/docs/_includes/layouts/main.njk index f9e06dd9..b2c6a064 100644 --- a/docs/_includes/layouts/main.njk +++ b/docs/_includes/layouts/main.njk @@ -7,6 +7,16 @@ headerClass: elv-header-default
+ {% if page.url != '/search/' %} +
+ 🔍 +
+ +
+
+ {% endif %}
{% set navPages = collections.all | eleventyNavigation %} {% macro renderNavListItem(entry) -%} diff --git a/docs/search.md b/docs/search.md new file mode 100644 index 00000000..b704b2af --- /dev/null +++ b/docs/search.md @@ -0,0 +1,14 @@ +--- +title: Search documentation +eleventyExcludeFromCollections: true +--- + + + +