moved the sitetitle and sitebase options to the [metadata] section
This commit is contained in:
parent
1663d178ca
commit
a4ddb02bfe
|
@ -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 = ""
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user