Skip to content

Commit

Permalink
docs: add .dbmeta.md docs
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschubek committed Oct 29, 2024
1 parent 642a55f commit 2c51345
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
6 changes: 5 additions & 1 deletion docs/docs/configuration/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Image from "@theme/IdealImage";

# Metadata

Files and folder can be enriched with metadata and displayed. Metadata is stored in a file called `<name>.dbmeta.json`, where `<name>` is the exact file (including extension) or folder name. Put it in the same folder as the target file or folder. Metadata is stored in a JSON format specified below.
Files and folder can be annotated with metadata and displayed. Metadata is stored in a file called `<name>.dbmeta.json`, where `<name>` is the exact file (including extension) or folder name. Put it in the same folder as the target file or folder. Metadata is stored in a JSON format specified below.

The `*.dbmeta.json` files are hidden from the user and cannot be viewed.

Expand All @@ -25,6 +25,10 @@ The `*.dbmeta.json` files are hidden from the user and cannot be viewed.
```
<!-- TODO: "password": "mysecurepassword" -->

:::info
If you are looking for the ".dbmeta.**md**" files, see [Readme Rendering](./readme.md).
:::

## Properties

#### Description
Expand Down
8 changes: 6 additions & 2 deletions docs/docs/configuration/readme.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
sidebar_position: 4
slug: readme
---
# Readme Rendering

If there is a `readme.md` (case insensitive) (can be configured) file in the current directory, it will be rendered. GitHub flavored markdown is supported.
If there is a `readme.md` (case insensitive) (can be configured) file in the current directory, it will be rendered. GitHub flavored markdown is supported. See [Demo Page](https://dir-demo.adriansoftware.de/examples/).

### `.dbmeta.md` file
You can specify a `.dbmeta.md` file in a directory to render it while also hiding it from the file tree, API and downloads at the same time. A `.dbmeta.md` file will override a existing `readme.md` file. See [Demo](https://dir-demo.adriansoftware.de/examples/markdown/).

:::info
By default unsafe HTML inside markdown (such as `<script>`) will be escaped. You can allow any html by enabling the option. However, allowing untrusted HTML can result in XSS attacks.
Expand All @@ -13,4 +17,4 @@ By default unsafe HTML inside markdown (such as `<script>`) will be escaped. You

import EnvConfig from '@site/src/components/EnvConfig';

<EnvConfig name="README_RENDER|README_NAME|README_FIRST|ALLOW_RAW_HTML" init="true|readme.md|false|false" values="true,false|<string>|true,false|true,false" versions="1.1|3.2|3.2|1.1" desc="|The case-insensitive file name which should be rendered|Render the readme above the file tree instead of below it.|" />
<EnvConfig name="README_RENDER|README_NAME|README_FIRST|ALLOW_RAW_HTML|README_META" init="true|readme.md|false|false|true" values="true,false|<string>|true,false|true,false|true,false" versions="1.1|3.2|3.2|1.1|3.5" desc="|The case-insensitive file name which should be rendered|Render the readme above the file tree instead of below it.||Renders a .dbmeta.md file if it exists" />
1 change: 1 addition & 0 deletions examples/foo bar/markdown/.dbmeta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is a `.dbmeta.md` file. It is rendered as markdown but hidden from the file list. The other "README.md" file is ignored.

0 comments on commit 2c51345

Please sign in to comment.