diff --git a/omicron/ssg/config.py b/omicron/ssg/config.py index 92432c2..7b104e0 100644 --- a/omicron/ssg/config.py +++ b/omicron/ssg/config.py @@ -42,6 +42,9 @@ class SiteConfig: else: path = Path("/") + if not path.is_absolute(): + raise ConfigError("base_url config property must not be a relative path") + return (origin, path) @staticmethod diff --git a/omicron/ssg/site.py b/omicron/ssg/site.py index f944d2d..fc00657 100644 --- a/omicron/ssg/site.py +++ b/omicron/ssg/site.py @@ -183,8 +183,6 @@ class Site: "base_url config value is missing a domain name, " "can't add canonical url to content" ) - if not self.config.base_dir.is_absolute(): - raise ConfigError("base_url config value must be an absolute path") self.discover() outputs: list[Output] = [*self.directories, *self.content] for output in sorted(outputs, key=lambda o: o.destination.as_posix()):