Hey all,
I’m trying to add bootstrap-grid and masonry to the LoveIt theme
I’ve added the Bootstrap and Masonry assets to the assets/lib/ folder and declared them in the jsdelivr.yml file. I’ve also updated the config.toml to add bootstrap as a parameter that can be enabled. This part seems to be working fine when I edit the assets.html file in the /themes/LoveIt/_default /partials/ directory. However if I try adding an assets.html the root folder system to override the theme version it doesn’t seem to override it.
The directories I have tried putting the file in are the following:
- /layouts/_default/partials/
- /layouts/portfolio/partials/
- /layouts/_default/
- /layouts/
- /partials/
Below is the code I am trying to add and the variables which are already in the top of the file to help with context.
{{- $params := .Scratch.Get "params" -}}
{{- $cdn := .Scratch.Get "cdn" | default dict -}}
{{- $fingerprint := .Scratch.Get "fingerprint" -}}
{{- $config := (.Scratch.Get "this").config -}}
{{- /* The code I have added */ -}}
{{- /* bootstrapMasonryJS.js */ -}}
{{- if .Site.Params.bootstrapmasonry | and .Site.Params.bootstrapmasonry.enable -}}
{{- $source := $cdn.bootstrapMasonryCSS | default "lib/bootstrap/dist/css/bootstrap-grid.min.css" -}}
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
{{- $source := $cdn.bootstrapMasonryJS | default "lib/masonry-layout/dist/masonry.pkgd.min.js" -}}
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $config = dict "bootstrapMasonry" true | merge $config -}}
{{- end -}}
If you need any more information, please ask.
Many Thanks