mirror of
https://github.com/borgmatic-collective/borgmatic.git
synced 2026-07-22 02:03:01 +02:00
Merge branch 'main' into reference-docs
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ module.exports = function(eleventyConfig) {
|
|||||||
if (process.env.NODE_ENV == "production") {
|
if (process.env.NODE_ENV == "production") {
|
||||||
return link;
|
return link;
|
||||||
}
|
}
|
||||||
return link.replace('https://torsion.org/borgmatic/', 'http://localhost:8080/');
|
return link.replace('https://torsion.org/', 'http://localhost:8080/');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let markdownItAnchorOptions = {
|
let markdownItAnchorOptions = {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
https://torsion.org/borgmatic/
|
https://torsion.org/borgmatic/
|
||||||
* #1161: Fix a traceback (TypeError) in the "check" action with Python 3.14.
|
* #1161: Fix a traceback (TypeError) in the "check" action with Python 3.14.
|
||||||
* Add documentation search.
|
* Add documentation search.
|
||||||
|
* Change the URL of the local documentation development server to be more like the production URL.
|
||||||
|
|
||||||
2.0.9
|
2.0.9
|
||||||
* #1105: More accurately collect Btrfs subvolumes to snapshot. As part of this, the Btrfs hook no
|
* #1105: More accurately collect Btrfs subvolumes to snapshot. As part of this, the Btrfs hook no
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ headerClass: elv-header-default
|
|||||||
{% if page.url != '/search/' %}
|
{% if page.url != '/search/' %}
|
||||||
<div id="search-entrance">
|
<div id="search-entrance">
|
||||||
🔍
|
🔍
|
||||||
<form action="/search/">
|
<form action="/borgmatic/search/">
|
||||||
<label>
|
<label>
|
||||||
<input type="search" name="query" placeholder="Search">
|
<input type="search" name="query" placeholder="Search">
|
||||||
</label>
|
</label>
|
||||||
@@ -21,7 +21,7 @@ headerClass: elv-header-default
|
|||||||
{% set navPages = collections.all | eleventyNavigation %}
|
{% set navPages = collections.all | eleventyNavigation %}
|
||||||
{% macro renderNavListItem(entry) -%}
|
{% macro renderNavListItem(entry) -%}
|
||||||
<li{% if entry.url == page.url %} class="elv-toc-active"{% endif %}>
|
<li{% if entry.url == page.url %} class="elv-toc-active"{% endif %}>
|
||||||
<a {% if entry.url %}href="{% if borgmatic.environment == "production" %}https://torsion.org/borgmatic{% else %}http://localhost:8080{% endif %}{{ entry.url | url }}"{% endif %}>{{ entry.title }}</a>
|
<a {% if entry.url %}href="{% if borgmatic.environment == "production" %}https://torsion.org/borgmatic{% else %}http://localhost:8080/borgmatic{% endif %}{{ entry.url | url }}"{% endif %}>{{ entry.title }}</a>
|
||||||
{%- if entry.children.length -%}
|
{%- if entry.children.length -%}
|
||||||
<ul>
|
<ul>
|
||||||
{%- for child in entry.children %}{{ renderNavListItem(child) }}{% endfor -%}
|
{%- for child in entry.children %}{{ renderNavListItem(child) }}{% endfor -%}
|
||||||
|
|||||||
@@ -1,9 +1,38 @@
|
|||||||
services:
|
services:
|
||||||
|
traefik:
|
||||||
|
image: public.ecr.aws/docker/library/traefik:3.5.3
|
||||||
|
container_name: borgmatic-docs-traefik
|
||||||
|
command:
|
||||||
|
- "--global.checkNewVersion=false"
|
||||||
|
- "--global.sendAnonymousUsage=false"
|
||||||
|
- "--entrypoints.web.address=:8080"
|
||||||
|
- "--accesslog"
|
||||||
|
- "--accesslog.fields.headers.defaultmode=keep"
|
||||||
|
- "--providers.docker"
|
||||||
|
- "--providers.docker.exposedbydefault=false"
|
||||||
|
- "--api.insecure=false"
|
||||||
|
- "--api.dashboard=false"
|
||||||
|
- "--log.level=WARN"
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:8080:8080"
|
||||||
|
volumes:
|
||||||
|
- ${CONTAINER_SOCKET_PATH:-/run/user/docker.sock}:/var/run/docker.sock:ro
|
||||||
docs:
|
docs:
|
||||||
image: borgmatic-docs
|
image: borgmatic-docs
|
||||||
container_name: borgmatic-docs
|
container_name: borgmatic-docs
|
||||||
ports:
|
labels:
|
||||||
- 8080:80
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.borgmatic-docs.rule=PathPrefix(`/borgmatic`)"
|
||||||
|
# - "traefik.http.routers.borgmatic-docs.middlewares=borgmatic-trailing-slash-redirectregex,borgmatic-docs-redirectregex,borgmatic-stripprefix"
|
||||||
|
- "traefik.http.routers.borgmatic-docs.middlewares=borgmatic-trailing-slash-redirectregex,borgmatic-stripprefix"
|
||||||
|
- "traefik.http.middlewares.borgmatic-trailing-slash-redirectregex.redirectregex.regex=^(.*)/borgmatic$$"
|
||||||
|
- "traefik.http.middlewares.borgmatic-trailing-slash-redirectregex.redirectregex.replacement=$${1}/borgmatic/"
|
||||||
|
- "traefik.http.middlewares.borgmatic-trailing-slash-redirectregex.redirectregex.permanent=true"
|
||||||
|
# - "traefik.http.middlewares.borgmatic-docs-redirectregex.redirectregex.regex=^(.*)/borgmatic/docs/(.*)$$"
|
||||||
|
# - "traefik.http.middlewares.borgmatic-docs-redirectregex.redirectregex.replacement=$${1}/borgmatic/$${2}"
|
||||||
|
# - "traefik.http.middlewares.borgmatic-docs-redirectregex.redirectregex.permanent=true"
|
||||||
|
- "traefik.http.middlewares.borgmatic-stripprefix.stripprefix.prefixes=/borgmatic"
|
||||||
|
- "traefik.http.routers.borgmatic-docs.entrypoints=web"
|
||||||
build:
|
build:
|
||||||
dockerfile: docs/Dockerfile
|
dockerfile: docs/Dockerfile
|
||||||
context: ..
|
context: ..
|
||||||
@@ -16,6 +45,6 @@ services:
|
|||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
echo; echo "You can view dev docs at http://localhost:8080"; echo
|
echo; echo "You can view dev docs at http://localhost:8080/borgmatic/"; echo
|
||||||
depends_on:
|
depends_on:
|
||||||
- docs
|
- docs
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ This script assumes you have permission to run `docker`. If you don't, then
|
|||||||
you may need to run with `sudo`.
|
you may need to run with `sudo`.
|
||||||
|
|
||||||
After you run the script, you can point your web browser at
|
After you run the script, you can point your web browser at
|
||||||
http://localhost:8080 to view the documentation with your changes.
|
http://localhost:8080/borgmatic/ to view the documentation with your changes.
|
||||||
|
|
||||||
To close the documentation server, ctrl-C the script. Note that it does not
|
To close the documentation server, ctrl-C the script. Note that it does not
|
||||||
currently auto-reload, so you'll need to stop it and re-run it for any
|
currently auto-reload, so you'll need to stop it and re-run it for any
|
||||||
|
|||||||
+2
-2
@@ -2,8 +2,8 @@
|
|||||||
title: Search documentation
|
title: Search documentation
|
||||||
eleventyExcludeFromCollections: true
|
eleventyExcludeFromCollections: true
|
||||||
---
|
---
|
||||||
<link href="/pagefind/pagefind-ui.css" rel="stylesheet">
|
<link href="/borgmatic/pagefind/pagefind-ui.css" rel="stylesheet">
|
||||||
<script src="/pagefind/pagefind-ui.js"></script>
|
<script src="/borgmatic/pagefind/pagefind-ui.js"></script>
|
||||||
<div id="search"></div>
|
<div id="search"></div>
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener('DOMContentLoaded', (event) => {
|
window.addEventListener('DOMContentLoaded', (event) => {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ USER_PODMAN_SOCKET_PATH=/run/user/$UID/podman/podman.sock
|
|||||||
|
|
||||||
if [ -e "$USER_PODMAN_SOCKET_PATH" ]; then
|
if [ -e "$USER_PODMAN_SOCKET_PATH" ]; then
|
||||||
export DOCKER_HOST="unix://$USER_PODMAN_SOCKET_PATH"
|
export DOCKER_HOST="unix://$USER_PODMAN_SOCKET_PATH"
|
||||||
|
export CONTAINER_SOCKET_PATH="$USER_PODMAN_SOCKET_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BUILDKIT_PROGRESS=plain docker-compose --file docs/docker-compose.yaml up --build --force-recreate
|
BUILDKIT_PROGRESS=plain docker-compose --file docs/docker-compose.yaml up --build --force-recreate
|
||||||
|
|||||||
Reference in New Issue
Block a user