From a847aa443aa95f17657ca92791562dbe6195f4a6 Mon Sep 17 00:00:00 2001 From: SirLagz Date: Fri, 27 Jun 2025 23:32:50 +0800 Subject: [PATCH] Updated instance description doco and added logging --- docs/running-gathio/customization.md | 4 +++- src/lib/config.ts | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/running-gathio/customization.md b/docs/running-gathio/customization.md index b764138e..e7bc7a31 100644 --- a/docs/running-gathio/customization.md +++ b/docs/running-gathio/customization.md @@ -33,7 +33,9 @@ The title will appear at the top of the page and in the footer menu. The instance description is a block of text which appears at the top of the public event list page (which is the home page on instances where `show_public_event_list` is set to `true`) and the 'About' page (which is the home page on instances where `show_public_event_list` is set to `false`). -The instance description is rendered from the Markdown file `static/instance-description.md`; if this file is missing, it will default to a generic line of text. +The instance description is rendered from the Markdown file `static/instance-description-(LOCALE).md`; if this file is missing, it will default to a generic line of text. + +To check the locale that your server is running, you can check the log file which will show what instance description file Gathio is trying to load. Within the instance description, you can use most Markdown formatting, as on static pages, and also you can supply the template string `{{ siteName }}`, which will be converted to the value of `site_name` as specified in `config.toml`. diff --git a/src/lib/config.ts b/src/lib/config.ts index 35fc42cc..6053e249 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -168,6 +168,7 @@ export const instanceDescription = (): string => { let instanceDescription = defaultInstanceDescription; let instancedescfile = "./static/instance-description-" + i18next.language + ".md"; try { + console.log("Attempting to load instance description file: "+instancedescfile); if (fs.existsSync(instancedescfile)) { const fileBody = fs.readFileSync( instancedescfile,