I am having a great time working with Hugo, I’ve been making various shortcodes and am wondering what is the best way to share them? A theme is way over the top, and they’re probably not generic enough to warrant being a built-in shortcode.
Would it be worth my time to create a new “Helpful Shortcodes” section of the docs, much like the Themes section? Some of the shortcodes I’d like to contribute:
Mobile
Generates HTML with a mobile-phone frame and adaptive imagery
{{< mobile src="mobile.png" class="dark responsive" alt="FlowVRP Mobile App" >}}
It’s a private repo and relies on Hugo pipes to generate the SCSS - ultimately I’m not sure how to organise a theme-component that has both Shortcode, custom SCSS pipeline and a light requirement for an icon library that hijacks the <i> element… The SCSS depends on my WIP framework (flowcss.com) so needs to be decoupled before it can be shared. For my own development purposes I find it a lot quicker to work with the framework. Plus the resulting CSS is pretty damn light.
I imagine there’s a tonne of snippets, shortcodes and themes that heavily rely on Bootstrap - a coupling that I find irritating. Even the hugo built-in paginator has “bootstrap-compatible styles”. Shame. As such I don’t know how I’d feel about releasing something that forces people to use my framework…
Maybe the best approach is to have a site-wide variable that dictates the classnames used for these components, ie: