also search the root directory for repo images

This commit is contained in:
mappu 2021-04-12 13:33:59 +12:00
parent 3c54a6eff4
commit f7833f8dde
1 changed files with 2 additions and 2 deletions

4
api.go
View File

@ -273,12 +273,12 @@ func (this *Application) filesInDirectory(ctx context.Context, repo, dir string)
}
// imageFilesForRepo finds documentation images for the repository.
// It searches the dist/ and doc/ subdirectories.
// It searches the top-level directory and the dist/ and doc/ subdirectories.
func (this *Application) imageFilesForRepo(ctx context.Context, repo string) ([]ReaddirEntry, error) {
ret := []ReaddirEntry{}
for _, dirName := range []string{`dist`, `doc`} {
for _, dirName := range []string{``, `dist`, `doc`} {
files, err := this.filesInDirectory(ctx, repo, dirName)
if err != nil {