Changes
4 changed files (+16/-7)
-
-
@@ -14,6 +14,7 @@ ScanPath string `yaml:"scanPath"`Readme []string `yaml:"readme"` MainBranch []string `yaml:"mainBranch"` Ignore []string `yaml:"ignore,omitempty"` Unlisted []string `yaml:"unlisted,omitempty"` } `yaml:"repo"` Dirs struct { Templates string `yaml:"templates"`
-
-
-
@@ -61,6 +61,7 @@ • dirs: use this to override the default templates and static assets.• repo.readme: readme files to look for. • repo.mainBranch: main branch names to look for. • repo.ignore: repos to ignore, relative to scanPath. • repo.unlisted: repos to hide, relative to scanPath. • server.name: used for go-import meta tags and clone URLs.
-
-
-
@@ -40,11 +40,12 @@infos := []info{} for _, dir := range dirs { if !dir.IsDir() || d.isIgnored(dir.Name()) { name := dir.Name() if !dir.IsDir() || d.isIgnored(name) || d.isUnlisted(name) { continue } path := filepath.Join(d.c.Repo.ScanPath, dir.Name()) path := filepath.Join(d.c.Repo.ScanPath, name) gr, err := git.Open(path, "") if err != nil { log.Println(err)
-
@@ -58,14 +59,10 @@ log.Println(err)return } name := dir.Name() desc := getDescription(path) infos = append(infos, info{ DisplayName: getDisplayName(name), Name: name, Desc: desc, Desc: getDescription(path), Idle: humanize.Time(c.Author.When), d: c.Author.When, })
-
-
-
@@ -30,6 +30,16 @@ }return } func (d *deps) isUnlisted(name string) bool { for _, i := range d.c.Repo.Unlisted { if name == i { return true } } return false } func (d *deps) isIgnored(name string) bool { for _, i := range d.c.Repo.Ignore { if name == i {
-