Skip to content

Commit 048bec5

Browse files
authored
Merge pull request #1951 from dotnetCarpenter/hugo-build-time
Build: use partialCached
2 parents dd454e4 + 7ea3705 commit 048bec5

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

layouts/_default/baseof.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ <h1>Redirecting&hellip;</h1>
6666

6767
{{ $style := resources.Get "sass/application.scss" | resources.ExecuteAsTemplate "application.scss" . | css.Sass | resources.Minify | fingerprint }}
6868
<link rel="stylesheet" href="{{ $style.RelPermalink }}"{{ if (hasPrefix .Site.BaseURL "https://") }} integrity="{{ $style.Data.Integrity }}"{{ end }}>
69+
<script src="{{ relURL "js/modernizr.js" }}"></script>
6970
<!--[if (gte IE 6)&(lte IE 8)]>
7071
<script src="{{ relURL "js/selectivizr-min.js" }}"></script>
7172
<![endif]-->
@@ -83,7 +84,7 @@ <h1>Redirecting&hellip;</h1>
8384
<div id="content-wrapper">
8485
<div class="inner">
8586
{{ partial "site-root.html" . }}
86-
{{ partial "footer.html" . }}
87+
{{ partialCached "footer.html" . }}
8788
</div> <!-- .inner -->
8889
</div> <!-- #content-wrapper -->
8990
{{ else if (isset .Params "book") }}
@@ -111,7 +112,7 @@ <h1>{{ .Params.book.section.cs_number }} {{ .Params.book.chapter.title }} - {{ .
111112
{{ end }}
112113
</div>
113114
</div>
114-
{{ partial "footer.html" . }}
115+
{{ partialCached "footer.html" . }}
115116
</div>
116117
{{ else if (isset .Params "docname") }}
117118
<div class="inner">
@@ -144,7 +145,7 @@ <h3 hidden="true" data-pagefind-weight="{{ $weight }}">{{ $command_name }}</h3>
144145
</div>
145146
</div>
146147
</div>
147-
{{ partial "footer.html" . }}
148+
{{ partialCached "footer.html" . }}
148149
</div>
149150
{{ else }}
150151
<div class="inner">
@@ -181,7 +182,8 @@ <h1 data-pagefind-meta="title">About{{ if (isset .Params "subtitle") }} - {{ .Pa
181182
{{ end }}
182183
</div>
183184
</div>
184-
{{ partial "footer.html" . }}
185+
{{ if eq (.Scratch.Get "section") "search" }}<script src="{{ relURL "pagefind/pagefind-ui.js" }}"></script>{{ end }}
186+
{{ partialCached "footer.html" . }}
185187
</div>
186188
{{ end }}
187189

layouts/partials/footer.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,5 @@
1515
<script src="{{ relURL "js/jquery-ui-1.8.18.custom.min.js" }}"></script>
1616
<script src="{{ relURL "js/jquery.defaultvalue.js" }}"></script>
1717
<script src="{{ relURL "js/session.min.js" }}"></script>
18-
<script src="{{ relURL "js/modernizr.js" }}"></script>
19-
<script src="{{ relURL "js/modernize.js" }}"></script>
20-
{{ if eq (.Scratch.Get "section") "search" }}<script src="{{ relURL "pagefind/pagefind-ui.js" }}"></script>{{ end }}
2118
{{ $js := resources.Get "js/application.js" | resources.ExecuteAsTemplate "js/application.js" . | resources.Minify | fingerprint }}
2219
<script src="{{ $js.RelPermalink }}"{{ if (hasPrefix .Site.BaseURL "https://") }} integrity="{{ $js.Data.Integrity }}"{{ end }}></script>

layouts/partials/site-root.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ <h3>Community</h3>
4343
</div>
4444
</section>
4545
<section id="front-downloads">
46-
{{ partial "monitor.html" . }}
46+
{{ partialCached "monitor.html" . }}
4747
<table>
4848
<tr>
4949
<td nowrap="true"><a href="{{ relURL "downloads/guis" }}" class="icon gui" id="gui-link">Graphical UIs</a></td>

layouts/shortcodes/monitor.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{ partial "monitor.html" . }}
1+
{{ partialCached "monitor.html" . }}

0 commit comments

Comments
 (0)