Any interest in building a snippet section?

Would it be a good idea to gather code snippets in the forum (or elsewhere) with explanations? The search function helps but it would be in one place. I have my own code snippets (html, css, js, hugo etc.) in Gistbox.

1 Like

I can only say that is very good idea.
Some things in documentation have very short explainations and not enough examples.

This will change, hopefully very soon. I don’t know if a “snippets” section would serve the purposes of improving documentation as much as it would reduce the time to get up and running and help establish some best practices among the Hugo community, at least if we’re talking about the same thing.

I’d advocate for a repository of partials that can be treated like components for the majority of common use cases…

The thing that gets tricky is deciding on facets such as CSS classes, attributes, etc…

With the upcoming shift in the docs, I’d rather beef up the various content sections–functions in particular–to have as many examples as possible…

2 Likes

For CSS classes, I would recommend either none (where possible), or use something like Bootsrap (I think some of the examples in the docs already use this). I don’t personally use Bootstrap (I prefer foundation), but it is always relatively easy to adapt, and I think more newbie-friendly.

But yes, I agree with your viewpoint @rdwatters. A repository of partials sounds great \ more examples in the existing docs. As someone new to Golang, and relatively new programming in general the docs have been invaluable.