Repository navigation
Replies: 2 comments 19 replies
|
Glad you like the theme! I can imagine the theme's logic can be a bit challenging at first. But you're right, there's a more elegant way to integrate these kind of scripts. I'm not sure you're going to like it, because it does use Hugo's module system... ;-) Hinode uses modules for the following reasons:
I prepared a guide how to develop a Hugo module compatible with Hinode. It explains how to ingest JavaScript files and stylesheets into the build pipeline. The files are bundled into Hinode's core assets and minified to improve the site's performance. Hinode will also take care of (lazy) loading the files when applicable. I'd be willing to include support for Mermaid diagrams as part of the Hinode ecosystem. Perhaps we could jointly develop such an open-source module? |
|
BTW, sorry for adding an off-topic question... |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
first of all, it really is a great theme, thank you for providing this awesome theme!!
Sometimes I struggle a bit to understand the builtin magic.
I wanted to add mermaid support to my blog. What I did was copying the whole
baseof.htmlfile from the template to my hugo project and then I added the mermaid module as a script at the bottom of the page:And while this worked, it felt like the wrong way of doing it.
Another way is to put the script import into a partial, but also I have no Idea how to get my own partial into the footer without adding and overriding the original files from the theme.
Can you give me a hint whatβs the right way of doing it? I read the docs, but I donβt understand this part and also I am not familiar with writing modules and somehow I hope I could avoid it.
Thank you and best regards,
Richard
All reactions