From 35d94aacdf579e7918ae928bc1dc83196cb38221 Mon Sep 17 00:00:00 2001 From: daudix Date: Sat, 19 Apr 2025 21:15:21 +0300 Subject: [PATCH] Ask user to set global site title if none is set (fixes #129) --- templates/partials/title.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/partials/title.html b/templates/partials/title.html index 8d8897f..c951c98 100644 --- a/templates/partials/title.html +++ b/templates/partials/title.html @@ -1,7 +1,11 @@ {# Taken from https://github.com/welpo/tabi/blob/69713c973c11d7646c8fe56476261d96cc1978d8/templates/partials/title.html #} {#- Setup -#} -{%- set suffix = config.title | safe -%} +{%- if config.title -%} + {%- set suffix = config.title | safe -%} +{%- else -%} + {{- throw(message='Title has not been set in config.toml, Please set one.') -}} +{%- endif -%} {%- set custom_separator = config.extra.title_separator | default(value="-") -%} {%- set separator = " " ~ custom_separator ~ " " -%}