Hi, I have this new error although I’ve been using Hugo fine for a few years. I guess my shortcode broke during an update but I don’t know the cause.
Error msg:faiiled to render shortcode "nanogallery": failed to process shortcode: execute of template failed: html/template:shortcodes/nanogallery.html: ends in a non-text context: {stateJS delimNone urlPartNone jsCtxRegexp attrNone elementScript <nil>} Error: Process completed with exit code 1.
nanogallery.html:
nanogallery.html buffers
<!-- configfile can be an absolute path or page relative -->
{{ $configFilePath := ( .Get "configfile" ) }}
{{ if not ( hasPrefix ( .Get "configfile" ) "/" ) }}
{{ $configFilePath = print $.Page.File.Dir $configFilePath }}
{{ end }}
{{ $contentFilePath := print $.Page.File.Dir ( .Get "contentfile" ) }}
{{ $galId := .Get "id" | default "gallery" }}
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"/>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/nanogallery2/3.0.5/css/nanogallery2.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/nanogallery2/3.0.5/jquery.nanogallery2.core.min.js"></script>
<div id="{{ $galId }}"></div>
<script><!--
$(document).ready(function () {
$("#{{ $galId }}").nanogallery2({
{{ $configFilePath | readFile | safeJS }}
items:
{{ $contentFilePath | readFile | safeJS }}
});
});
--></script> ```
Thanks for the help