Skip to content

Commit

Permalink
chore: docs/ as default loader
Browse files Browse the repository at this point in the history
  • Loading branch information
phil65 committed Nov 23, 2023
1 parent 1b3c233 commit beaa204
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mknodes/info/contexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

logger = log.get_logger(__name__)

DEFAULT_LOADER = jinjarope.FileSystemLoader("docs")


@dataclasses.dataclass
class Context:
Expand Down Expand Up @@ -339,7 +341,7 @@ class ProjectContext(Context):
)
"""Link source."""
env_config: jinjarope.EnvConfig = dataclasses.field(
default_factory=jinjarope.EnvConfig,
default_factory=lambda: jinjarope.EnvConfig(loader=DEFAULT_LOADER)
)
# resources: Resources = dataclasses.field(default_factory=Resources)
# pyproject: pyproject.PyProject = dataclasses.field(
Expand Down Expand Up @@ -379,7 +381,7 @@ def for_config(
git=folderinfo.git.context,
theme=theme_context or ThemeContext(),
links=links,
env_config=cfg.get("env_config", jinjarope.EnvConfig()),
env_config=cfg.get("env_config", jinjarope.EnvConfig(loader=DEFAULT_LOADER)),
)

def populate_linkprovider(self):
Expand Down

0 comments on commit beaa204

Please sign in to comment.