diff --git a/Makefile b/Makefile index 8036526d..b5cab41a 100644 --- a/Makefile +++ b/Makefile @@ -260,9 +260,9 @@ generate-config-reference: build META_WEIGHT="6" \ LAYOUT_NO_HEADLINE="1" \ LAYOUT_HEADINGS_START="#" \ - LAYOUT_NOTICE_START="{{% notice note %}}" \ + LAYOUT_NOTICE_START='{{% notice style="note" %}}' \ LAYOUT_NOTICE_END="{{% /notice %}}" \ - LAYOUT_HINT_START="{{% notice hint %}}" \ + LAYOUT_HINT_START='{{% notice style="tip" %}}' \ LAYOUT_HINT_END="{{% /notice %}}" \ LAYOUT_UPLINK="[go to top](#reference)" \ $(abspath $(BINARY)) generate --config-reference --to $(CONFIG_REFERENCE_DIR) diff --git a/docs/content/configuration/path.md b/docs/content/configuration/path.md index f833d85f..c1f831ed 100644 --- a/docs/content/configuration/path.md +++ b/docs/content/configuration/path.md @@ -98,7 +98,7 @@ default { {{% /tab %}} {{< /tabs >}} -{{% notice hint %}} +{{% notice style="tip" %}} Set `base-dir` to an absolute path to resolve `files` and `local:backup` relative to it. Set `source-base` if you need a separate base path for backup sources. When you want to use relative source paths for backup, set the `source-relative` option. This will change the working directory of the `restic backup` command to `source-base` and will not expand `source` to an absolute path. diff --git a/docs/content/configuration/templates.md b/docs/content/configuration/templates.md index 9d7a64bb..491e939e 100644 --- a/docs/content/configuration/templates.md +++ b/docs/content/configuration/templates.md @@ -616,7 +616,7 @@ The following functions can be used to encode data (e.g. when dealing with arbit * `{{ "plain" | base64 }}` => `cGxhaW4=` - Base64 encoded input * `{{ "plain" | hex }}` => `706c61696e` - Hexadecimal encoded input -{{% notice hint %}} +{{% notice style="tip" %}} Encode with `js` when creating **strings** in *YAML*, *TOML* or *JSON* configuration files, e.g.: `"{{ .Env.MY_VAR | js }}"`. This ensures the markup remains correct and can be parsed regardless of the input data. {{% /notice %}} diff --git a/docs/themes/hugo-theme-relearn b/docs/themes/hugo-theme-relearn index 259f21f8..aedb4384 160000 --- a/docs/themes/hugo-theme-relearn +++ b/docs/themes/hugo-theme-relearn @@ -1 +1 @@ -Subproject commit 259f21f898516a5c5da21a3fb959ef9129f4250f +Subproject commit aedb438436cd539ddc36370d45b25480c60e3c0f diff --git a/examples/dynamic.yaml b/examples/dynamic.yaml new file mode 100644 index 00000000..94574908 --- /dev/null +++ b/examples/dynamic.yaml @@ -0,0 +1,32 @@ +# yaml-language-server: $schema=http://localhost:1313/resticprofile/jsonschema/config.json + +# {{ $databases := .Env.databases | split " " }} + +version: "2" + +global: + initialize: true + +groups: + mysql: + profiles: +# {{ range $db := $databases }} + - stdin-{{ $db }} +# {{ end }} + +profiles: + base: + description: "Read from stdin" + repository: "/Volumes/RAMDisk/example" + password-file: key + +# {{ range $db := $databases }} + stdin-{{ $db }}: + inherit: base + description: "Database {{ $db }}" + backup: + stdin-command: "mysqldump --complete-insert --routines --triggers --single-transaction --no-tablespaces --databases {{ $db }}" + stdin-filename: "{{ $db }}.gz" + tag: + - "{{ $db }}" +# {{ end }}