Skip to content

Commit

Permalink
Merge pull request #115 from pelican-plugins/siteurl_in_templates
Browse files Browse the repository at this point in the history
Add SITEURL to template context
  • Loading branch information
phibos authored Mar 5, 2024
2 parents edb9bb2 + d5da798 commit 9c2eafe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pelican/plugins/photos/photos.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ def render_template(self, default_template_name=None, **kwargs):
tpl_name = default_template_name
if tpl_name is None:
logger.error("Unable to find template for profile")
return g_generator.get_template(tpl_name).render(**kwargs)

context_vars = {"SITEURL": pelican_settings["SITEURL"]}
context_vars.update(kwargs)
return g_generator.get_template(tpl_name).render(**context_vars)

@property
def file_suffix(self) -> str:
Expand Down

0 comments on commit 9c2eafe

Please sign in to comment.