func ReadSecondMeta(srcDir string) (*model.MetaAll, error) {
	var metaFile string
	for t, f := range model.ShouldMetaFiles() {
		metaFile = filepath.Join(srcDir, f)
		if !com.IsFile(metaFile) {
			continue
		}
		log15.Debug("Read|%s", metaFile)
		bytes, err := ioutil.ReadFile(metaFile)
		if err != nil {
			return nil, err
		}
		meta, err := model.NewMetaAll(bytes, t)
		if err != nil {
			return nil, err
		}
		if meta != nil {
			return meta, nil
		}
	}
	return nil, errMetaFileMissing
}
ReadSecondMeta read meta file in srcDir
package builder
import (
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
	"sort"
	"strings"
	"github.com/Unknwon/com"
	"github.com/go-xiaohei/pugo/app/helper"
	"github.com/go-xiaohei/pugo/app/model"
	"gopkg.in/inconshreveable/log15.v2"
)
var (
	errMetaFileMissing = fmt.Errorf("meta file is missing")
)
type (
	Source struct {
		Meta      *model.Meta
		Nav       model.NavGroup
		Owner     *model.Author
		Authors   map[string]*model.Author
		Comment   *model.Comment
		Analytics *model.Analytics
		Build     *model.Build
		I18n      map[string]*helper.I18n
		Posts      model.Posts
		PagePosts  map[int]*model.PagerPosts
		IndexPosts model.PagerPosts  
		PostPage   int
		Archive    model.Archives
		Pages      model.Pages
		Tags       map[string]*model.Tag
		TagPosts   map[string]*model.TagPosts
	}
)
func NewSource(all *model.MetaAll) *Source {
	s := &Source{
		Meta:      all.Meta,
		Nav:       all.NavGroup,
		Owner:     all.AuthorGroup[0],
		Comment:   all.Comment,
		Analytics: all.Analytics,
		Authors:   make(map[string]*model.Author),
		Build:     all.Build,
	}
	for _, a := range all.AuthorGroup {
		s.Authors[a.Name] = a
	}
	return s
}
func ReadSource(ctx *Context) {
	ctx.parseDir()
	if ctx.Err != nil {
		return
	}
	metaAll, err := ReadSecondMeta(ctx.srcDir)
	if err != nil {
		ctx.Err = err
		return
	}
	ctx.Source = NewSource(metaAll)
	w := helper.NewWorker(0)
	w.AddFunc(func() error {
		ctx.Source.I18n = ReadLang(ctx.SrcLangDir())
		return nil
	})
	w.AddFunc(func() error {
		if ctx.Source.Build != nil && ctx.Source.Build.DisablePost {
			return nil
		}
		var err error
		ctx.Source.Posts, err = ReadPosts(ctx)
		if err != nil {
			err = fmt.Errorf("ReadPosts|%s", err.Error())
		}
		return err
	})
	w.AddFunc(func() error {
		if ctx.Source.Build != nil && ctx.Source.Build.DisablePage {
			return nil
		}
		var err error
		ctx.Source.Pages, err = ReadPages(ctx)
		if err != nil {
			err = fmt.Errorf("ReadPages|%s", err.Error())
		}
		return err
	})
	w.RunOnce()
	if len(w.Errors()) > 0 {
		for _, err := range w.Errors() {
			log15.Error("Read|%s", err.Error())
		}
		ctx.Err = w.Errors()[0]
	}
}