Skip to content

Commit

Permalink
Merge pull request #592 from john0isaac/add-static-paths-get-set
Browse files Browse the repository at this point in the history
add getter and setter for output path
  • Loading branch information
john0isaac committed Feb 22, 2024
2 parents 1c3f925 + 073e1ed commit e04b96c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/render_engine/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Site:
}
_output_path: str = "output"
_template_path: str = "templates"
static_paths: set = {"static"}
_static_paths: set = {"static"}
plugin_settings: dict = {"plugins": defaultdict(dict)}

def __init__(
Expand All @@ -50,7 +50,7 @@ def __init__(
self.theme_manager = ThemeManager(
engine=engine,
output_path=self._output_path,
static_paths=self.static_paths,
static_paths=self._static_paths,
)
self.route_list = dict()
self.site_settings = dict()
Expand All @@ -66,6 +66,14 @@ def output_path(self) -> str:
def output_path(self, output_path: str) -> None:
self.theme_manager.output_path = output_path

@property
def static_paths(self) -> set:
return self.theme_manager.static_paths

@static_paths.setter
def static_paths(self, static_paths: set) -> None:
self.theme_manager.static_paths = static_paths

def update_site_vars(self, **kwargs) -> None:
self.site_vars.update(**kwargs)
self.theme_manager.engine.globals.update(self.site_vars)
Expand Down

0 comments on commit e04b96c

Please sign in to comment.