Allow any files in `_patterns` to be copied to `publicDir`
Since we've recently gotten in the ability to use folders at the pattern level, I've been keeping more assets related to patterns next to the pattern files and I think it'd be great if those ended up next to the compiled HTML (possibly after turning on a config option as I realize copying lots of large files could slow compiles down). Here's my use case:
I'm using the pattern descriptions markdown file to also show the comp image of that pattern. However, I've got to reference to from the public directory to it's location in the source directory, like so:

What would be great is if an image link could be as simple as:

Thanks for considering!
Ok, saw those source/ links in your earlier example and it made me squeamish. I think this could be done with a plug-in. I'm not keen on making this core as then it becomes spec and yet another thing for the Node team to copy. Maybe there could be opt-in file types with some sane defaults auto-populated. It would probably only work with that folder structure. Doable with some caveats at least.
Yeah, links like that make me squeamish too; very brittle. Adds a lot of value though! Helps to make conversations with clients less about pages and more about components for sure. If this was in core; here's how I'd see it set up as a config array of file types to copy over with a default of just twig or mustache. So:
copyFileTypesToPublic:
- twig
I think this would be helpful as part of the core spec as I see this as very helpful. Especially as more people realize that they can document each pattern with markdown. Having this in the code slide-up is really nice. Perhaps the styleguide kit might also want to make a tab to show off the scss file? Your call!
Plug-ins can do the following:
- add options to the config (on install)
- add tab & panel combos to the modals (this is all the work being done in
feature-panels)
So, honestly, the only thing this feature gets from being in core is that PL/Node has to copy it. And I'm definitely not picking sides on non-PHP tech (e.g. Sass). I'm willing to write this feature and make it "official." I'm just not willing to bake it into core.
A plugin would be great!
In thinking through this more I need to write hooks in Core to make this happen in an efficient manner. It also opens the possibility for redoing/simplifying panels. I need to write up my ideas so they can go up for approval as part of the spec for Pattern Lab. The changes would also affect how PL/Node works.