Commit 01a8b115 authored by berumuron's avatar berumuron
Browse files

tec: Show a warning to encourage to set a uuid

parent 092091ee
......@@ -29,9 +29,14 @@ def load(configuration_path, environment, output_path):
site_key = f"SITE_{key.upper()}"
configuration[site_key] = value
configuration["SITE_UUID"] = str(
uuid.uuid5(uuid.NAMESPACE_URL, configuration["SITE_URL"])
)
if "SITE_UUID" not in configuration:
the_uuid = str(uuid.uuid5(uuid.NAMESPACE_URL, configuration["SITE_URL"]))
configuration["SITE_UUID"] = the_uuid
print(
"Warning: you should set a uuid in your configuration file.",
f"Here’s one for you: {the_uuid}",
)
if "SITE_AUTHOR" not in configuration:
configuration["SITE_AUTHOR"] = f"{configuration['SITE_TITLE']}'s author"
if configuration["SITE_URL"] == "filesystem":
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment