Versions in this module Expand all Collapse all v0 v0.63.3 Jan 28, 2020 Changes in this version + const CACHE_CLEAR_ALL + const CACHE_OTHER + func AssignMetadata(metadata []map[string]interface{}, resources ...resource.Resource) error + func ResourceCacheKey(filename string) string + func ResourceKeyContainsAny(key string, partitions []string) bool + func ResourceKeyPartitions(filename string) []string + type ResourceCache struct + func (c *ResourceCache) Contains(key string) bool + func (c *ResourceCache) DeletePartitions(partitions ...string) + func (c *ResourceCache) GetOrCreate(key string, f func() (resource.Resource, error)) (resource.Resource, error) + func (c *ResourceCache) GetOrCreateResources(key string, f func() (resource.Resources, error)) (resource.Resources, error) + type ResourceSourceDescriptor struct + FileInfo os.FileInfo + Fs afero.Fs + LazyPublish bool + OpenReadSeekCloser resource.OpenReadSeekCloser + RelTargetFilename string + SourceFile source.File + SourceFilename string + TargetBasePaths []string + TargetPaths func() page.TargetPaths + func (r ResourceSourceDescriptor) Filename() string + type ResourceTransformation interface + Key func() internal.ResourceTransformationKey + Transform func(ctx *ResourceTransformationCtx) error + type ResourceTransformationCtx struct + Data map[string]interface{} + From io.Reader + InMediaType media.Type + InPath string + OpenResourcePublisher func(relTargetPath string) (io.WriteCloser, error) + OutMediaType media.Type + OutPath string + SourcePath string + To io.Writer + func (ctx *ResourceTransformationCtx) AddOutPathIdentifier(identifier string) + func (ctx *ResourceTransformationCtx) PublishSourceMap(content string) error + func (ctx *ResourceTransformationCtx) ReplaceOutPathExtension(newExt string) + type ResourceTransformer interface + type Spec struct + FileCaches filecache.Caches + Logger *loggers.Logger + MediaTypes media.Types + OutputFormats output.Formats + Permalinks page.PermalinkExpander + ResourceCache *ResourceCache + TextTemplates tpl.TemplateParseFinder + func NewSpec(s *helpers.PathSpec, fileCaches filecache.Caches, logger *loggers.Logger, ...) (*Spec, error) + func (r *Spec) CacheStats() string + func (r *Spec) ClearCaches() + func (r *Spec) DeleteCacheByPrefix(prefix string) + func (r *Spec) IsInImageCache(key string) bool + func (r *Spec) New(fd ResourceSourceDescriptor) (resource.Resource, error) + func (s *Spec) String() string + type Transformer interface + Transform func(...ResourceTransformation) (ResourceTransformer, error)