Skip to content

Commit

Permalink
Update variable name.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdeanwallace committed Mar 25, 2024
1 parent f5d1c8b commit efaf6e5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions jinjabread/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit efaf6e5

Please sign in to comment.