Skip to content

Commit

Permalink
Merge pull request #438 from render-engine/updates-to-lint-python-ver…
Browse files Browse the repository at this point in the history
…sion

Update Python version
  • Loading branch information
kjaymiller committed Dec 6, 2023
2 parents 6477463 + b4d2f9d commit 4c901a7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
6 changes: 5 additions & 1 deletion src/render_engine/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ def _render_from_template(self, template: jinja2.Template, **kwargs) -> str:
)

def _render_content(self, engine: jinja2.Environment | None = None, **kwargs) -> str:
"""Renders the content of the page."""
"""
Renders the content of the page.
If there is not content or a template attribute, an error will be raised.
"""
engine = getattr(self, "engine", engine)
template = getattr(self, "template", None)

Expand Down
2 changes: 0 additions & 2 deletions src/render_engine/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,6 @@ def render(self) -> None:
for slug, entry in self.route_list.items():
progress.update(task_add_route, description=f"[blue]Adding[gold]Route: [blue]{slug}")
if isinstance(entry, Page):
if getattr(entry, "collection", None):
Page._pm.hook.render_content(Page=entry, settings=self.site_settings.get("plugins", None))
for route in entry.routes:
progress.update(
task_add_route,
Expand Down

0 comments on commit 4c901a7

Please sign in to comment.