HUGO

Heroicons packaged as a Hugo Module

Nice package of MIT licensed SVG icons – I have packaged them as a Hugo Module here:

I will tag a release once the upstream gets one.

4 Likes

Thanks for that. I have questions. :slight_smile:

I’m trying to grok go modules, and I don’t really use dependencies in my development work. I know, I know, how strange, but let’s presume I’m five years old and have somehow tricked you into letting me mod the forums…

I use modules because I keep my content sections in distinct repos. So I am use to adding them to my modules section in config. When I look at your repo my first thought is, “I can just add a few lines to my config to pull in the original heroicons repo”.

I’m guessing at scale this makes more sense, but from my perspective right now it seems like there is just an extra step.

Is the idea that folks will use that module, and then by convention folks will know where assets are? As an individual, should I be building these myself, for my own use, or should I wait for others to create collections? If my workflow doesn’t involve importing dependencies do modules in Hugo lose most of their usefulness? :thinking:

I’m not sure what the question is … The heroicons is probably not the best example, but you do save some keystrokes in the mount mappings and you get a copy-pastable example of how to use it in your templates. The real benefit of third-party modules, I guess, comes from:

  • Situations where setting up the file mounts and then including them in your files is real boring work. Examples include inclusions of some JS libraries with minification and integrity hashing etc. when in prod but not when running the server.
  • Third party components that provide native and useful Hugo functionality (breadcrumbs, pagination, shortcodes, whatever)

I suspect this gets more useful as it matures – and note that you can create your own “modules collections” with the common tools that you include. Copying a few lines of config.toml for each new projec sure beats doing this every time.

2 Likes