Skip to content

Commit

Permalink
Fix: Prevent infinite recursion in head.html partial (microcks#275)
Browse files Browse the repository at this point in the history
Signed-off-by: harshita91 <[email protected]>
  • Loading branch information
harshita9104 committed Feb 6, 2025
1 parent f1875da commit 51d9477
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions themes/microcks/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<html lang="{{ site.LanguageCode | default `en-US` }}" itemscope itemtype="http://schema.org/WebPage">

<head>
<!-- head (don't cache it) -->
{{ partial "head.html" . }}
<!-- Prevent recursive call to head.html -->
{{ if not .IsHome }} <!-- Check if this is the home page -->
{{ partial "head.html" . }}
{{ end }}

<!-- cache partial only in production -->
{{ if hugo.IsProduction }}
Expand Down
6 changes: 4 additions & 2 deletions themes/microcks/layouts/documentation/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
itemscope
itemtype="http://schema.org/WebPage">
<head>
<!-- head (don't cache it) -->
{{ partial "essentials/head.html" . }}
<!-- Prevent recursive call to head.html -->
{{ if not .IsHome }} <!-- Check if this is the home page -->
{{ partial "essentials/head.html" . }}
{{ end }}


<!-- cache partial only in production -->
Expand Down

0 comments on commit 51d9477

Please sign in to comment.