code: func NewSourceSpec(ps *helpers.PathSpec, fs afero.Fs) *SourceSpec {
  	cfg := ps.Cfg
  	defaultLang := cfg.GetString("defaultContentLanguage")
  	languages := cfg.GetStringMap("languages")
  
  	disabledLangsSet := make(map[string]bool)
  
  	for _, disabledLang := range cfg.GetStringSlice("disableLanguages") {
  		disabledLangsSet[disabledLang] = true
  	}
  
  	if len(languages) == 0 {
  		l := langs.NewDefaultLanguage(cfg)
  		languages[l.Lang] = l
  		defaultLang = l.Lang
  	}
  
  	ignoreFiles := cast.ToStringSlice(cfg.Get("ignoreFiles"))
  	var regexps []*regexp.Regexp
  	if len(ignoreFiles) > 0 {
  		for _, ignorePattern := range ignoreFiles {
  			re, err := regexp.Compile(ignorePattern)
  			if err != nil {
  				helpers.DistinctErrorLog.Printf("Invalid regexp %q in ignoreFiles: %s", ignorePattern, err)
  			} else {
  				regexps = append(regexps, re)
  			}
  
  		}
  	}
  
  	return &SourceSpec{ignoreFilesRe: regexps, PathSpec: ps, SourceFs: fs, Languages: languages, DefaultContentLanguage: defaultLang, DisabledLanguages: disabledLangsSet}
  
  }
docs: // NewSourceSpec initializes SourceSpec using languages the given filesystem and PathSpec.