Skip to content

Commit

Permalink
fix: ensure documents are localized when used with renderPartial
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydw committed Jul 3, 2021
1 parent 0751a77 commit 947954d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions views/base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</head>
<body>
<div class="main">
{% set partial = pod.doc('/content/partials/header.yaml').fields %}
{% set partial = pod.doc('/content/partials/header.yaml', doc.locale).fields %}
{{renderPartial.renderPartial(partial)}}
{% if doc.fields.partials %}
{% for partial in doc.fields.partials %}
Expand All @@ -25,6 +25,6 @@
{{doc.body|markdown|safe}}
</div>
{% endif %}
{% set partial = pod.doc('/content/partials/footer.yaml').fields %}
{% set partial = pod.doc('/content/partials/footer.yaml', doc.locale).fields %}
{{renderPartial.renderPartial(partial)}}
</div>
2 changes: 1 addition & 1 deletion views/macros/headMetadata.njk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set social_metadata = pod.doc('/content/partials/base.yaml') %}
{% set social_metadata = pod.doc('/content/partials/base.yaml', doc.locale) %}

{% macro headMetadata() %}
{% if doc.description %}
Expand Down

0 comments on commit 947954d

Please sign in to comment.