Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyAssets ¶
CopyAssets copies all files from assetsDir to outputDir, preserving directory structure. No transformation is applied — files are copied verbatim. Returns nil without error if assetsDir does not exist.
func ProcessAssets ¶
ProcessAssets copies files from assetsDir to outputDir, calling hookFn for each file before writing. The hook may modify the AssetFile content. If hookFn is nil, files are copied unchanged (same as CopyAssets).
func ResolveURL ¶
ResolveURL resolves an asset path relative to baseURL.
Types ¶
type AssetFile ¶
type AssetFile struct {
Path string // Relative path within the assets directory (e.g., "css/main.css")
Content []byte // Raw file content
}
AssetFile represents a single asset file passed through the onAssetProcess hook. Plugins receive this struct and may modify Content before it is written.
Click to show internal directories.
Click to hide internal directories.