From cf962c245f45541b975c13ac3f4026b86985636e Mon Sep 17 00:00:00 2001 From: Litruv Date: Mon, 10 Feb 2025 00:23:15 +1100 Subject: [PATCH] add metadata configuration section to README and example JSON --- README.md | 26 ++++++++++++++++++++++++++ example.index.json | 25 +++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 571d439..cb6cb85 100644 --- a/README.md +++ b/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 | | `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: diff --git a/example.index.json b/example.index.json index f83d571..eab7481 100644 --- a/example.index.json +++ b/example.index.json @@ -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" } ] }