Documentation
¶
Index ¶
- type Fs
- func (f *Fs) AssetsFs() afero.Fs
- func (f *Fs) AssetsFsMakePathRelative(filename string, checkExists bool) (string, bool)
- func (f *Fs) AssetsFsRealDirs(from string) []string
- func (f *Fs) AssetsFsRealFilename(rel string) string
- func (f *Fs) ContentFs() afero.Fs
- func (f *Fs) Glob(fs afero.Fs, pattern string, handle func(fi fs.FileMetaInfo) (bool, error)) error
- func (f *Fs) LayoutFs() afero.Fs
- func (f *Fs) NewBasePathFs(source afero.Fs, path string) afero.Fs
- func (f *Fs) Os() afero.Fs
- func (f *Fs) RelPathify(filename string, workingDir string) string
- func (f *Fs) ResolveJSConfigFile(name string) string
- func (f *Fs) ResourcesCacheFs() afero.Fs
- func (f *Fs) ReverseLookupContent(filename string, checkExists bool) ([]fs.ComponentPath, error)
- func (f *Fs) Walk(fs afero.Fs, start string, cb fs.WalkCallback, conf fs.WalkwayConfig) error
- func (f *Fs) WalkAssets(start string, cb fs.WalkCallback, conf fs.WalkwayConfig) error
- func (f *Fs) WalkContent(start string, cb fs.WalkCallback, conf fs.WalkwayConfig) error
- func (f *Fs) WalkI18n(start string, cb fs.WalkCallback, conf fs.WalkwayConfig) error
- func (f *Fs) WalkLayouts(start string, cb fs.WalkCallback, conf fs.WalkwayConfig) error
- func (f *Fs) WorkFs() afero.Fs
- type OriginFs
- func (f *OriginFs) Origin() afero.Fs
- func (f *OriginFs) Publish() afero.Fs
- func (f *OriginFs) PublishDirAbs() string
- func (f *OriginFs) PublishDirStatic() afero.Fs
- func (f *OriginFs) PublishFs() afero.Fs
- func (f *OriginFs) ResourcesDirAbs() string
- func (f *OriginFs) SourceFs() afero.Fs
- func (f *OriginFs) Working() afero.Fs
- func (f *OriginFs) WorkingDirAbs() string
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fs ¶
type Fs struct {
*OriginFs
Content *valueobject.ComponentFs
Data *valueobject.ComponentFs
I18n *valueobject.ComponentFs
Layouts *valueobject.ComponentFs
Archetypes *valueobject.ComponentFs
Assets *valueobject.ComponentFs
AssetsWithDuplicatesPreserved *valueobject.ComponentFs
// The work folder (may be a composite of project and theme components).
Work afero.Fs
// When in multihost we have one static filesystem per language. The sync
// static files is currently done outside of the Hugo build (where there is
// a concept of a site per language).
// When in non-multihost mode there will be one entry in this map with a blank key.
Static map[string]*valueobject.ComponentFs
// Writable filesystem on top the project's resources directory,
// with any sub module's resource fs layered below.
ResourcesCache afero.Fs
RootFss []*valueobject.RootMappingFs
*Service
}
func (*Fs) AssetsFsMakePathRelative ¶
func (*Fs) AssetsFsRealDirs ¶
func (*Fs) AssetsFsRealFilename ¶
func (*Fs) RelPathify ¶
RelPathify trims any WorkingDir prefix from the given filename. If the filename is not considered to be absolute, the path is just cleaned.
func (*Fs) ResolveJSConfigFile ¶
ResolveJSConfigFile resolves the JS-related config file to a absolute filename. One example of such would be postcss.config.js.
func (*Fs) ResourcesCacheFs ¶
func (*Fs) ReverseLookupContent ¶
func (*Fs) Walk ¶
func (f *Fs) Walk(fs afero.Fs, start string, cb fs.WalkCallback, conf fs.WalkwayConfig) error
func (*Fs) WalkAssets ¶
func (f *Fs) WalkAssets(start string, cb fs.WalkCallback, conf fs.WalkwayConfig) error
func (*Fs) WalkContent ¶
func (f *Fs) WalkContent(start string, cb fs.WalkCallback, conf fs.WalkwayConfig) error
func (*Fs) WalkI18n ¶
func (f *Fs) WalkI18n(start string, cb fs.WalkCallback, conf fs.WalkwayConfig) error
func (*Fs) WalkLayouts ¶
func (f *Fs) WalkLayouts(start string, cb fs.WalkCallback, conf fs.WalkwayConfig) error
type OriginFs ¶
type OriginFs struct {
// Source is Hugo's source file system.
// Note that this will always be a "plain" Afero filesystem:
// * afero.OsFs when running in production
// * afero.MemMapFs for many of the tests.
Source afero.Fs
// PublishDir is where Hugo publishes its rendered content.
// It's mounted inside publishDir (default /public).
PublishDir afero.Fs
// WorkingDirReadOnly is a read-only file system
// restricted to the project working dir.
WorkingDirReadOnly afero.Fs
// WorkingDirWritable is a writable file system
// restricted to the project working dir.
WorkingDirWritable afero.Fs
AbsWorkingDir string
AbsPublishDir string
AbsResourcesDir string
}
func (*OriginFs) PublishDirAbs ¶
func (*OriginFs) PublishDirStatic ¶
func (*OriginFs) ResourcesDirAbs ¶
func (*OriginFs) WorkingDirAbs ¶
type Service ¶
type Service struct {
}
func (*Service) NewFileMetaInfo ¶
func (s *Service) NewFileMetaInfo(filename string) fs.FileMetaInfo
func (*Service) NewFileMetaInfoWithContent ¶
func (s *Service) NewFileMetaInfoWithContent(content string) fs.FileMetaInfo