hof icon indicating copy to clipboard operation
hof copied to clipboard

Enable embedding user content file globs or directories in code gen

Open verdverm opened this issue 1 year ago • 0 comments

The idea here is to have the necessary feature to support a Hugo like content directory, where we have an unbounded depth directory to create files 1-1 for based on files the user has outside of the generator.

I don't think we want to use @embed, but still unsure...

  • CUE plans to use this for embedding files
  • We want it to be user-land files, not tracked through imports & modules

We do need to create an output file per match, and I'm thinking a field like Templates (Content) is a good first pass. But we need to read and then populate a Content: [filepath=string]: { metadata: _, content: string }

This might be useful in hof/flow, but there is a path to achieve this there already (with file.Glob)

verdverm avatar Mar 18 '23 20:03 verdverm