From 2495b97b0ba33f3e7bf96e09d4a6c8dc7ac5107e Mon Sep 17 00:00:00 2001 From: mjfernez Date: Sun, 24 Dec 2023 12:41:02 -0500 Subject: Update SEO, grab meta descriptions from .desc Keyword tags are outdated so those have been removed. Descriptions are more important that SEO. The description of the parent directory is used --- view_functions.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'view_functions.py') diff --git a/view_functions.py b/view_functions.py index 4163c2e..b2e0720 100644 --- a/view_functions.py +++ b/view_functions.py @@ -81,3 +81,12 @@ def is_hidden_path(path): if d.startswith('.'): return True return False + + +def load_description(parent_dir): + description = None + description_file = parent_dir + '/' + siteconfig.DESC_FILE + if os.path.isfile(description_file): + with open(description_file, "r") as f: + description = f.read().strip() + return description -- cgit v1.2.3