mirror of
https://github.com/litruv/Docs-Viewer.git
synced 2026-07-24 02:36:07 +10:00
add metadata configuration section to README and example JSON
This commit is contained in:
26
README.md
26
README.md
@@ -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 |
|
| `defaultOpen` | boolean? | Automatically expand this folder in the sidebar |
|
||||||
| `icon` | string? | Custom Font Awesome classes |
|
| `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
|
## Additional Author Info
|
||||||
|
|
||||||
You can add an "author" object in your `index.json` to display your name, role, and social links:
|
You can add an "author" object in your `index.json` to display your name, role, and social links:
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
{
|
{
|
||||||
"title": "Litruv",
|
|
||||||
"defaultPage": "welcome",
|
"defaultPage": "welcome",
|
||||||
|
"metadata": {
|
||||||
|
"title": "Litruv / Documentation",
|
||||||
|
"description": "Documentation for Litruv's plugins",
|
||||||
|
"thumbnail": "img/og-image.png",
|
||||||
|
"site_name": "Litruv"
|
||||||
|
},
|
||||||
"documents": [
|
"documents": [
|
||||||
{
|
{
|
||||||
"title": "Welcome",
|
"title": "Welcome",
|
||||||
@@ -21,7 +26,8 @@
|
|||||||
{
|
{
|
||||||
"title": "WIP: Objective Marker System",
|
"title": "WIP: Objective Marker System",
|
||||||
"path": "docs/objective-marker-system.md",
|
"path": "docs/objective-marker-system.md",
|
||||||
"slug": "objective-markers"
|
"slug": "objective-markers",
|
||||||
|
"thumbnail": "images/docThumb.png"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -39,6 +45,21 @@
|
|||||||
"icon": "fab fa-youtube",
|
"icon": "fab fa-youtube",
|
||||||
"url": "https://www.youtube.com/c/Litruv",
|
"url": "https://www.youtube.com/c/Litruv",
|
||||||
"title": "YouTube - 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"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user