use partial instead of partialCached for footer.html
footer has involved a lot of config keys since our fork, sometimes the toc scroll behavior is broken due to cached footer is inconsistant with the current file
This commit is contained in:
parent
ad52cd9e51
commit
e91423d6f2
|
@ -21,7 +21,7 @@ jobs:
|
|||
hugo-version: '0.91.2'
|
||||
|
||||
- name: Build
|
||||
run: cd exampleSite && hugo -D --verbose --minify
|
||||
run: cd exampleSite && hugo -D --gc --verbose --minify
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,2 +1,2 @@
|
|||
run-example:
|
||||
cd exampleSite && hugo server -D -p 13131
|
||||
cd exampleSite && hugo server -D --gc -p 13131
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<main class="main {{- if (eq .Kind `page`) -}}{{- print " post" -}}{{- end -}}">
|
||||
{{- block "main" . }}{{ end }}
|
||||
</main>
|
||||
{{ partialCached "footer.html" . .Layout .Kind (.Param "hideFooter") (.Param "ShowCodeCopyButtons") -}}
|
||||
{{ partial "footer.html" . -}}
|
||||
{{- block "body_end" . }}{{ end }}
|
||||
</body>
|
||||
|
||||
|
|
|
@ -158,8 +158,10 @@
|
|||
for (const listener of scrollListeners) {
|
||||
window.removeEventListener('scroll', listener)
|
||||
}
|
||||
window.scrollListeners = []
|
||||
return
|
||||
}
|
||||
// console.log('enable toc scroll')
|
||||
|
||||
const headings = document.querySelectorAll('h1[id],h2[id],h3[id],h4[id],h5[id]');
|
||||
const activeClass = 'active';
|
||||
|
|
Loading…
Reference in New Issue