add metadata configuration section to README and example JSON

This commit is contained in:
2025-02-10 00:23:15 +11:00
parent 62751e141c
commit cf962c245f
2 changed files with 49 additions and 2 deletions

View File

@@ -122,6 +122,32 @@ Folders can contain nested documents or subfolders. Mark a folder by setting `"t
| `defaultOpen` | boolean? | Automatically expand this folder in the sidebar |
| `icon` | string? | Custom Font Awesome classes |
## Metadata Configuration
You can include a "metadata" object in `index.json` to provide:
- Site-wide title and short description
- Thumbnail for social sharing
- Display name for your site
```json
"metadata": {
"title": "Litruv / Documentation",
"description": "Documentation for Litruv's plugins",
"thumbnail": "img/og-image.png",
"site_name": "Litruv"
}
```
#### Metadata Configuration Options
| Option | Type | Description |
|---------------|--------|----------------------------------------------------------|
| `title` | string | Title of your documentation site |
| `description` | string | Description of your documentation site |
| `thumbnail` | string | URL to a thumbnail image for social sharing |
| `site_name` | string | Display name for your site |
## Additional Author Info
You can add an "author" object in your `index.json` to display your name, role, and social links:

View File

@@ -1,6 +1,11 @@
{
"title": "Litruv",
"defaultPage": "welcome",
"metadata": {
"title": "Litruv / Documentation",
"description": "Documentation for Litruv's plugins",
"thumbnail": "img/og-image.png",
"site_name": "Litruv"
},
"documents": [
{
"title": "Welcome",
@@ -21,7 +26,8 @@
{
"title": "WIP: Objective Marker System",
"path": "docs/objective-marker-system.md",
"slug": "objective-markers"
"slug": "objective-markers",
"thumbnail": "images/docThumb.png"
}
]
}
@@ -39,6 +45,21 @@
"icon": "fab fa-youtube",
"url": "https://www.youtube.com/c/Litruv",
"title": "YouTube - Litruv"
},
{
"icon": "fab fa-steam",
"url": "https://steamcommunity.com/id/Litruv",
"title": "Steam - Litruv"
},
{
"icon": "fab fa-discord",
"url": "https://discordapp.com/users/220772082055774210",
"title": "Discord - @Litruv"
},
{
"icon": "fa-brands fa-bluesky",
"url": "https://bsky.app/profile/lit.mates.dev",
"title": "Bluesky - lit.mates.dev"
}
]
}