From 857280b5b680d2d09b13452efd1cdeade79f892f Mon Sep 17 00:00:00 2001 From: Jan-Lukas Else Date: Tue, 18 Feb 2025 22:30:35 +0100 Subject: [PATCH] Show file uses results from all blogs --- editorFiles.go | 1 + posts.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/editorFiles.go b/editorFiles.go index 4d3ce6d..f030140 100644 --- a/editorFiles.go +++ b/editorFiles.go @@ -72,6 +72,7 @@ func (a *goBlog) serveEditorFilesUsesResults(w http.ResponseWriter, r *http.Requ path: bc.getRelativePath(editorPath + editorFileUsesPath + "/" + filename), usesFile: filename, withoutFeeds: true, + allBlogs: true, }))) } diff --git a/posts.go b/posts.go index 5c1d787..f8e668e 100644 --- a/posts.go +++ b/posts.go @@ -295,6 +295,7 @@ type indexConfig struct { search string usesFile string withoutFeeds bool + allBlogs bool } const defaultPhotosPath = "/photos" @@ -335,7 +336,7 @@ func (a *goBlog) serveIndex(w http.ResponseWriter, r *http.Request) { } // Create paginator p := paginator.New(&postPaginationAdapter{config: &postsRequestConfig{ - blogs: []string{blog}, + blogs: lo.If(!ic.allBlogs, []string{blog}).Else([]string{}), sections: sections, taxonomy: ic.tax, taxonomyValue: ic.taxValue,