Include files from outside of partials

Hi, I’m using Hugo to create a pattern library, and have been successfully doing so for about a year and a half.

However, I’m using partials to include HTML files as rendered examples of my components and patterns, which is keeping me from bundling HTML, CSS, and JS files together in folders for a proper pattern library.

Is there a conceivable way to keep all of these files together, access them as partials or includes, as well as be able to access the CSS/Sass? I understand this is pushing Hugo’s intentions and feature set, but just wondering if i’m missing any feature.

If I’m understanding your question, then you could keep them together in page bundles, then when getting a given resource. use the .Content field to get its contents.

1 Like

Ah, ok. I’ll check that out as an option. Thanks!