From 9c6b2247a7bebc8ae0bc07c48dc11bf4c64e4d4a Mon Sep 17 00:00:00 2001 From: Akbar Rahman Date: Tue, 2 Jan 2024 03:54:09 +0000 Subject: [PATCH] update environment variable names --- gronk.py | 14 +++++++++----- readme.md | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gronk.py b/gronk.py index e6941c7..82303c4 100755 --- a/gronk.py +++ b/gronk.py @@ -24,9 +24,9 @@ GRONK_COMMIT = "dev" PANDOC_SERVER_URL = os.getenv("PANDOC_SERVER_URL", r"http://localhost:3030/") PANDOC_TIMEOUT = int(os.getenv("PANDOC_TIMEOUT", "120")) -CSS_DIR = Path(os.getenv("CSS_DIR", "/opt/gronk/css")) -JS_DIR = Path(os.getenv("JS_DIR", "/opt/gronk/js")) -TEMPLATES_DIR = Path(os.getenv("TEMPLATES_DIR", "/opt/gronk/templates")) +GRONK_CSS_DIR = Path(os.getenv("CSS_DIR", "/opt/gronk/css")) +GRONK_JS_DIR = Path(os.getenv("JS_DIR", "/opt/gronk/js")) +GRONK_TEMPLATES_DIR = Path(os.getenv("TEMPLATES_DIR", "/opt/gronk/templates")) JINJA_ENV = jinja2.Environment(loader=jinja2.PackageLoader("gronk"), autoescape=jinja2.select_autoescape) @@ -464,8 +464,12 @@ def main(args): process_home_index(args) # copy styling and js scripts necessary for function - shutil.copytree(CSS_DIR, args.output_dir.joinpath('css'), dirs_exist_ok=True) - shutil.copytree(JS_DIR, args.output_dir.joinpath('js'), dirs_exist_ok=True) + shutil.copytree(GRONK_CSS_DIR, + args.output_dir.joinpath('css'), + dirs_exist_ok=True) + shutil.copytree(GRONK_JS_DIR, + args.output_dir.joinpath('js'), + dirs_exist_ok=True) generate_tag_browser(args.output_dir.joinpath('tags')) diff --git a/readme.md b/readme.md index daf8f04..9180234 100644 --- a/readme.md +++ b/readme.md @@ -70,7 +70,7 @@ Combine it with `find` to UUIDify all your markdown files (but make a backup fir ## Custom Styling -To completely replace the existing styling, set the environment variable `CSS_DIR` to another directory with +To completely replace the existing styling, set the environment variable `GRONK_CSS_DIR` to another directory with a file called `styles.css`. To add additional styling, the default styling will attempt to import `styles.css` from the root of the notes