diff options
author | mjfernez <mjf@mjfer.net> | 2023-12-24 12:41:02 -0500 |
---|---|---|
committer | mjfernez <mjf@mjfer.net> | 2023-12-24 12:41:02 -0500 |
commit | 2495b97b0ba33f3e7bf96e09d4a6c8dc7ac5107e (patch) | |
tree | 6ca0ebc918e53f9e74152559f81d18d794dfb960 /view_functions.py | |
parent | ad7a378b801b0071182ef3205867d55a7697f775 (diff) | |
download | ezcms-2495b97b0ba33f3e7bf96e09d4a6c8dc7ac5107e.tar.gz |
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
Diffstat (limited to 'view_functions.py')
-rw-r--r-- | view_functions.py | 9 |
1 files changed, 9 insertions, 0 deletions
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 |