-
I have a site using https://github.com/mfg92/hugo-shortcode-gallery as follows:
... which works with my current theme. However, when trying Hinode the page is broken and I see in the console:
The code at that location is:
I'm not deeply familiar with Hugo/Modules (just started), so I'd appreciate help to learn the simplest way to make it work. The gallery code uses/injects multiple scripts, as seen here: https://github.com/mfg92/hugo-shortcode-gallery/blob/master/layouts/shortcodes/gallery.html#L50 I've checked https://gethinode.com/docs/advanced-settings/scripts/, but it's unclear to me if following those four steps in sequence (i.e. creating a custom module that loads such files) is the simplest and proper solution. It would mean I need to watch the gallery code for script changes and keep my module in sync. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Update: adding the JS in this way to force loading them in the required order fixed JS errors loading the page, but things are broken still (I suspect all other assets like CSS, etc. are not loading)
Is there a way to make hinode theme and the gallery shortcode to play well? |
Beta Was this translation helpful? Give feedback.
-
Hinode uses Hugo modules to bundle scripts and to transpile SCSS files. The docs provide more information on how to develop / integrate modules compatible with Hinode. A guide with step-by-step instruction is also available. The module system might seem a bit complicated at first. Let me know if you run into any issues. |
Beta Was this translation helpful? Give feedback.
-
Thanks! I'll close the discussion. |
Beta Was this translation helpful? Give feedback.
That would be my advise. You could directly integrate the sass and js files into Hinode's partials instead, but this will be more difficult to maintain.