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