1
0
mirror of https://gitlab.com/MisterBiggs/brain-quartz.git synced 2025-07-31 02:31:27 +00:00
Files
.github
assets
content
data
layouts
_default
partials
backlinks.html
contact.html
darkmode.html
footer.html
graph.html
head.html
page-list.html
popover.html
search.html
404.html
index.html
static
.gitignore
.hugo_build.lock
CODE_OF_CONDUCT.md
LICENSE.txt
Makefile
README.md
config.toml
screenshot.png
brain-quartz/layouts/partials/popover.html
Claudio Yanes 1313bd9779 Move css and js to appropriate files
Having the CSS and JS in the html template produces pages larger
than necessary, as each page need to contain all the js/css.
Separating them in appropriate files allow the browser to just download
them once and use them for all the pages. This is even more effective
with an aggressive cache policy for the js and css, something that can
be done without fear thanks to the implemented cache-busting.
Also, having then in separate files allows us to use Hugo pipelines
for minimizing the code.
2022-03-04 02:07:51 +00:00

7 lines
263 B
HTML

{{if $.Site.Data.config.enableLinkPreview}}
{{ $js := resources.Get "js/popover.js" | resources.Fingerprint "md5" | resources.Minify }}
<script src="{{ $js.Permalink }}"></script>
<script>
initPopover({{strings.TrimRight "/" .Site.BaseURL }})
</script>
{{end}}