From c697be659bdc3f22d500db334aaa1d26a5787f71 Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Wed, 8 Nov 2023 14:58:48 -0800 Subject: [PATCH] docs: adds docs for custom content (#2483) --- docs/.vitepress/config.ts | 1 + docs/guide/custom-documentation.md | 56 ++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 docs/guide/custom-documentation.md diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 2444a8b4..0cb5f9e9 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -68,6 +68,7 @@ export default defineConfig({ { text: "Healthcheck", link: "/guide/healthcheck" }, { text: "Hostname", link: "/guide/hostname" }, { text: "Remote Hosts", link: "/guide/remote-hosts" }, + { text: "Custom Documentation", link: "/guide/custom-documentation" }, { text: "Supported Env Vars", link: "/guide/supported-env-vars" }, { text: "Logging Files on Disk", link: "/guide/log-files-on-disk" }, { text: "Analytics", link: "/guide/analytics" }, diff --git a/docs/guide/custom-documentation.md b/docs/guide/custom-documentation.md new file mode 100644 index 00000000..efec1e6e --- /dev/null +++ b/docs/guide/custom-documentation.md @@ -0,0 +1,56 @@ +--- +title: Customizing Help Content +--- + +# Documentation and Content + +::: tip Note +This feature was introduced in version `v3.1.x` +::: +Dozzle can be used by many users from different levels. Some teams what a central place to explain how to use Dozzle and what each of their containers do. Dozzle supports markdown content by reading `/data/content/*.md` files. Multiple files are supported. Each file will create a link at the top of Dozzle. Here is an example of what `/data/content/help.md` might look like: + +```yml +--- +title: Help +--- +# This is help + +Hello, from Dozzle. + +Tables are also supported! + +| foo | bar | +| --- | --- | +| baz | bim | +``` + +`title` is used to show a link on Dozzle's home screen to `/content/help`. Dozzle will need `/data` mounted. Here is an example: + +::: code-group + +```sh [cli] +$ docker run -v /var/run/docker.sock:/var/run/docker.sock -v /path/to/dozzle/data:/data -p 8080:8080 amir20/dozzle +``` + +```yaml [docker-compose.yml] +version: "3" +services: + dozzle: + image: amir20/dozzle:latest + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /path/to/dozzle/data:/data + ports: + - 8080:8080 +``` + +```yml [help.md] +--- +title: Help +--- +# This is help + +Hello, from Dozzle. +``` + +:::