"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "resources/resource_transformers/tocss/scss/tocss.go" between
hugo-0.85.0.tar.gz and hugo-0.86.0.tar.gz

About: Hugo is a static site generator that takes a source directory of Markdown files and templates and uses these as input to create a complete website (written in Go).

tocss.go  (hugo-0.85.0):tocss.go  (hugo-0.86.0)
skipping to change at line 58 skipping to change at line 58
outName = path.Base(ctx.OutPath) outName = path.Base(ctx.OutPath)
options := t.options options := t.options
baseDir := path.Dir(ctx.SourcePath) baseDir := path.Dir(ctx.SourcePath)
options.to.IncludePaths = t.c.sfs.RealDirs(baseDir) options.to.IncludePaths = t.c.sfs.RealDirs(baseDir)
// Append any workDir relative include paths // Append any workDir relative include paths
for _, ip := range options.from.IncludePaths { for _, ip := range options.from.IncludePaths {
info, err := t.c.workFs.Stat(filepath.Clean(ip)) info, err := t.c.workFs.Stat(filepath.Clean(ip))
if err == nil { if err == nil {
filename := info.(hugofs.FileMetaInfo).Meta().Filename() filename := info.(hugofs.FileMetaInfo).Meta().Filename
options.to.IncludePaths = append(options.to.IncludePaths, filename) options.to.IncludePaths = append(options.to.IncludePaths, filename)
} }
} }
// To allow for overrides of SCSS files anywhere in the project/theme hie rarchy, we need // To allow for overrides of SCSS files anywhere in the project/theme hie rarchy, we need
// to help libsass revolve the filename by looking in the composite files ystem first. // to help libsass revolve the filename by looking in the composite files ystem first.
// We add the entry directories for both project and themes to the includ e paths list, but // We add the entry directories for both project and themes to the includ e paths list, but
// that only work for overrides on the top level. // that only work for overrides on the top level.
options.to.ImportResolver = func(url string, prev string) (newUrl string, body string, resolved bool) { options.to.ImportResolver = func(url string, prev string) (newUrl string, body string, resolved bool) {
// We get URL paths from LibSASS, but we need file paths. // We get URL paths from LibSASS, but we need file paths.
skipping to change at line 108 skipping to change at line 108
namePatterns = []string{"_%s.scss", "%s.scss", "_%s.sass" , "%s.sass"} namePatterns = []string{"_%s.scss", "%s.scss", "_%s.sass" , "%s.sass"}
} }
name = strings.TrimPrefix(name, "_") name = strings.TrimPrefix(name, "_")
for _, namePattern := range namePatterns { for _, namePattern := range namePatterns {
filenameToCheck := filepath.Join(basePath, fmt.Sprintf(na mePattern, name)) filenameToCheck := filepath.Join(basePath, fmt.Sprintf(na mePattern, name))
fi, err := t.c.sfs.Fs.Stat(filenameToCheck) fi, err := t.c.sfs.Fs.Stat(filenameToCheck)
if err == nil { if err == nil {
if fim, ok := fi.(hugofs.FileMetaInfo); ok { if fim, ok := fi.(hugofs.FileMetaInfo); ok {
return fim.Meta().Filename(), "", true return fim.Meta().Filename, "", true
} }
} }
} }
// Not found, let LibSASS handle it // Not found, let LibSASS handle it
return "", "", false return "", "", false
} }
if ctx.InMediaType.SubType == media.SASSType.SubType { if ctx.InMediaType.SubType == media.SASSType.SubType {
options.to.SassSyntax = true options.to.SassSyntax = true
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)