Tags: gobuffalo/buffalo
Tags
Inject file metadata to render (#2407) * Avoid memory allocation when calling Render * feat(render): add configurable template metadata injection - Add TemplateMetadataKeys and TemplateBaseDir fields to render Options - Implement addTemplateMetadata() method to inject file metadata into template data - Add extsAndBase() helper to parse file extensions and base names - Modify resolve() methods to return fs.FileInfo for metadata extraction - Support customizable metadata keys with fallback to Buffalo defaults - Include comprehensive test coverage for extsAndBase() functionality Templates can now access file path, base name, extension, and modification time while maintaining backward compatibility with existing configurations. * Code format --------- Co-authored-by: Antonio Pagano <645522+paganotoni@users.noreply.github.com>
PreviousNext