Skip to content

Commit 537f293

Browse files
Build: use partialCached
+ footer.html + monitor.html This gives a 11% (9 seconds) speedup, when building the site, on my system.
1 parent 6939def commit 537f293

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
@@ -73,7 +73,7 @@ <h1>Redirecting&hellip;</h1>
7373
<div id="content-wrapper">
7474
<div class="inner">
7575
{{ partial "site-root.html" . }}
76-
{{ partial "footer.html" . }}
76+
{{ partialCached "footer.html" . }}
7777
</div> <!-- .inner -->
7878
</div> <!-- #content-wrapper -->
7979
{{ else if (isset .Params "book") }}
@@ -101,7 +101,7 @@ <h1>{{ .Params.book.section.cs_number }} {{ .Params.book.chapter.title }} - {{ .
101101
{{ end }}
102102
</div>
103103
</div>
104-
{{ partial "footer.html" . }}
104+
{{ partialCached "footer.html" . }}
105105
</div>
106106
{{ else if (isset .Params "docname") }}
107107
<div class="inner">
@@ -128,7 +128,7 @@ <h3 hidden="true" data-pagefind-weight="{{ $weight }}">{{ $command_name }}</h3>
128128
</div>
129129
</div>
130130
</div>
131-
{{ partial "footer.html" . }}
131+
{{ partialCached "footer.html" . }}
132132
</div>
133133
{{ else }}
134134
<div class="inner">
@@ -165,7 +165,7 @@ <h1 data-pagefind-meta="title">About{{ if (isset .Params "subtitle") }} - {{ .Pa
165165
{{ end }}
166166
</div>
167167
</div>
168-
{{ partial "footer.html" . }}
168+
{{ partialCached "footer.html" . }}
169169
</div>
170170
{{ end }}
171171

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)