func (b basicPageHandler) Read(f *source.File, s *Site) HandledResult { page, err := NewPage(f.Path()) if err != nil { return HandledResult{file: f, err: err} } if _, err := page.ReadFrom(f.Contents); err != nil { return HandledResult{file: f, err: err} } page.Site = &s.Info page.Tmpl = s.Tmpl return HandledResult{file: f, page: page, err: err} }
func (h cssHandler) FileConvert(f *source.File, s *Site) HandledResult { x := cssmin.Minify(f.Bytes()) s.WriteDestFile(f.Path(), helpers.BytesToReader(x)) return HandledResult{file: f} }
func (h defaultHandler) FileConvert(f *source.File, s *Site) HandledResult { s.WriteDestFile(f.Path(), f.Contents) return HandledResult{file: f} }