also search the root directory for repo images
This commit is contained in:
parent
3c54a6eff4
commit
f7833f8dde
4
api.go
4
api.go
@ -273,12 +273,12 @@ func (this *Application) filesInDirectory(ctx context.Context, repo, dir string)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// imageFilesForRepo finds documentation images for the repository.
|
// 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) {
|
func (this *Application) imageFilesForRepo(ctx context.Context, repo string) ([]ReaddirEntry, error) {
|
||||||
|
|
||||||
ret := []ReaddirEntry{}
|
ret := []ReaddirEntry{}
|
||||||
|
|
||||||
for _, dirName := range []string{`dist`, `doc`} {
|
for _, dirName := range []string{``, `dist`, `doc`} {
|
||||||
|
|
||||||
files, err := this.filesInDirectory(ctx, repo, dirName)
|
files, err := this.filesInDirectory(ctx, repo, dirName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user