From 5a9a36f463dbcfb6e42b0b903d75e0ed8e35de55 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Sat, 30 Dec 2023 11:49:41 -0600 Subject: [PATCH] deduplicate TITLE_SUFFIX from new DOMAIN_NAME I will need the domain name for feed stuff, and I'm already crudely using the title suffix in the nav as if it was a domain name, so let's just be explicit in the case I ever change my mind on domain-in-title styling Signed-off-by: Brian S. Stephan --- incorporealcms/config.py | 3 ++- incorporealcms/pages.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/incorporealcms/config.py b/incorporealcms/config.py index 6e54e3b..b812ed7 100644 --- a/incorporealcms/config.py +++ b/incorporealcms/config.py @@ -61,7 +61,8 @@ class Config(object): } DEFAULT_PAGE_STYLE = 'light' - TITLE_SUFFIX = 'example.com' + DOMAIN_NAME = 'example.com' + TITLE_SUFFIX = DOMAIN_NAME CONTACT_EMAIL = 'admin@example.com' # specify FAVICON in your instance config.py to override the provided icon diff --git a/incorporealcms/pages.py b/incorporealcms/pages.py index 5f501ec..ceea938 100644 --- a/incorporealcms/pages.py +++ b/incorporealcms/pages.py @@ -168,8 +168,8 @@ def instance_resource_path_to_request_path(path): def generate_parent_navs(path): """Create a series of paths/links to navigate up from the given resource path.""" if path == 'pages/index.md': - # bail and return the title suffix (generally the domain name) as a terminal case - return [(app.config['TITLE_SUFFIX'], '/')] + # bail and return the domain name as a terminal case + return [(app.config['DOMAIN_NAME'], '/')] else: if path.endswith('index.md'): # index case: one dirname for foo/bar/index.md -> foo/bar, one for foo/bar -> foo