Skip to content

Commit 3d27312

Browse files
dotnetCarpenterdscho
authored andcommitted
Build: use partialCached
+ footer.html + monitor.html This gives a 11% (9 seconds) speedup, when building the site, on my system.
1 parent dd454e4 commit 3d27312

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

layouts/_default/baseof.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ <h1>Redirecting&hellip;</h1>
8383
<div id="content-wrapper">
8484
<div class="inner">
8585
{{ partial "site-root.html" . }}
86-
{{ partial "footer.html" . }}
86+
{{ partialCached "footer.html" . }}
8787
</div> <!-- .inner -->
8888
</div> <!-- #content-wrapper -->
8989
{{ else if (isset .Params "book") }}
@@ -111,7 +111,7 @@ <h1>{{ .Params.book.section.cs_number }} {{ .Params.book.chapter.title }} - {{ .
111111
{{ end }}
112112
</div>
113113
</div>
114-
{{ partial "footer.html" . }}
114+
{{ partialCached "footer.html" . }}
115115
</div>
116116
{{ else if (isset .Params "docname") }}
117117
<div class="inner">
@@ -144,7 +144,7 @@ <h3 hidden="true" data-pagefind-weight="{{ $weight }}">{{ $command_name }}</h3>
144144
</div>
145145
</div>
146146
</div>
147-
{{ partial "footer.html" . }}
147+
{{ partialCached "footer.html" . }}
148148
</div>
149149
{{ else }}
150150
<div class="inner">
@@ -181,7 +181,7 @@ <h1 data-pagefind-meta="title">About{{ if (isset .Params "subtitle") }} - {{ .Pa
181181
{{ end }}
182182
</div>
183183
</div>
184-
{{ partial "footer.html" . }}
184+
{{ partialCached "footer.html" . }}
185185
</div>
186186
{{ end }}
187187

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)