Move relative path check from Site.build to SiteConfig
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()):
|
||||
|
||||
Reference in New Issue
Block a user