From a4ddb02bfe556624d55a31665928f8bc90232ed0 Mon Sep 17 00:00:00 2001 From: Amy Gale Ruth Bowersox Date: Wed, 14 Aug 2024 23:08:04 -0600 Subject: [PATCH] moved the sitetitle and sitebase options to the [metadata] section --- doc/configuration.toml | 10 ++++------ src/dragonglass/config.py | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/doc/configuration.toml b/doc/configuration.toml index 18b6bd0..10d18f2 100644 --- a/doc/configuration.toml +++ b/doc/configuration.toml @@ -41,12 +41,6 @@ tldr = "clipboard-list" todo = "circle-check" warning = "triangle-alert" -[generate] -# The site base URL. If supplied, this will be added to a element in the page metadata. -sitebase = "" -# The site title. If supplied, this will be included in page metadata and used to formulate the default title. -sitetitle = "" - [templates] # The template directory name under the Obsidian vault. Default is ".dragonglass.tmpl". directory = ".dragonglass.tmpl" @@ -58,3 +52,7 @@ stylesheet = "dragonglass.css" [metadata] # If true, use page title as default description. description-title = false +# The site base URL. If supplied, this will be added to a element in the page metadata. +sitebase = "" +# The site title. If supplied, this will be included in page metadata and used to formulate the default title. +sitetitle = "" diff --git a/src/dragonglass/config.py b/src/dragonglass/config.py index 65dc693..52547f2 100644 --- a/src/dragonglass/config.py +++ b/src/dragonglass/config.py @@ -109,13 +109,13 @@ class Context: @property def site_base(self) -> str | None: """Returns the configured site base URL.""" - generate_section = self.config.get("generate", {}) + generate_section = self.config.get("metadata", {}) return generate_section.get("sitebase", None) @property def site_title(self) -> str | None: """Returns the configured site title.""" - generate_section = self.config.get("generate", {}) + generate_section = self.config.get("metadata", {}) return generate_section.get("sitetitle", None) @property