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 <bss@incorporeal.org>
This commit is contained in:
Brian S. Stephan 2023-12-30 11:49:41 -06:00
parent 680a2bc764
commit 5a9a36f463
Signed by: bss
GPG Key ID: 3DE06D3180895FCB
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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