moved the sitetitle and sitebase options to the [metadata] section

This commit is contained in:
Amy G. Bowersox 2024-08-14 23:08:04 -06:00
parent 1663d178ca
commit a4ddb02bfe
2 changed files with 6 additions and 8 deletions

View File

@ -41,12 +41,6 @@ tldr = "clipboard-list"
todo = "circle-check" todo = "circle-check"
warning = "triangle-alert" warning = "triangle-alert"
[generate]
# The site base URL. If supplied, this will be added to a <base> 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] [templates]
# The template directory name under the Obsidian vault. Default is ".dragonglass.tmpl". # The template directory name under the Obsidian vault. Default is ".dragonglass.tmpl".
directory = ".dragonglass.tmpl" directory = ".dragonglass.tmpl"
@ -58,3 +52,7 @@ stylesheet = "dragonglass.css"
[metadata] [metadata]
# If true, use page title as default description. # If true, use page title as default description.
description-title = false description-title = false
# The site base URL. If supplied, this will be added to a <base> 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 = ""

View File

@ -109,13 +109,13 @@ class Context:
@property @property
def site_base(self) -> str | None: def site_base(self) -> str | None:
"""Returns the configured site base URL.""" """Returns the configured site base URL."""
generate_section = self.config.get("generate", {}) generate_section = self.config.get("metadata", {})
return generate_section.get("sitebase", None) return generate_section.get("sitebase", None)
@property @property
def site_title(self) -> str | None: def site_title(self) -> str | None:
"""Returns the configured site title.""" """Returns the configured site title."""
generate_section = self.config.get("generate", {}) generate_section = self.config.get("metadata", {})
return generate_section.get("sitetitle", None) return generate_section.get("sitetitle", None)
@property @property