From efaf6e5374b57bcef7bbd4b185a4329649101482 Mon Sep 17 00:00:00 2001 From: Jason Wallace Date: Mon, 25 Mar 2024 12:10:23 +0200 Subject: [PATCH] Update variable name. --- jinjabread/base.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jinjabread/base.py b/jinjabread/base.py index 9cd4402..41e0be7 100644 --- a/jinjabread/base.py +++ b/jinjabread/base.py @@ -106,13 +106,13 @@ def _get_sibling_context_list(self): return context_list def get_context(self): - file_path = self.output_path.relative_to(self.site.config.output_dir) - if file_path.stem == "index": - url_path = "/" + file_path.parent.as_posix() + "/" + relative_path = self.output_path.relative_to(self.site.config.output_dir) + if relative_path.stem == "index": + url_path = "/" + relative_path.parent.as_posix() + "/" else: - url_path = "/" + file_path.with_suffix("").as_posix() + url_path = "/" + relative_path.with_suffix("").as_posix() context = self.site.config.context | { - "file_path": file_path.as_posix(), + "file_path": relative_path.as_posix(), "url_path": url_path, } if self.content_path.stem == "index":