From b0cf8c0713b2f14a018e45610104af3158972f6c Mon Sep 17 00:00:00 2001 From: adnano Date: Fri, 3 Sep 2021 00:45:12 -0400 Subject: [PATCH] site: Clean up deprecation warning --- site.go | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/site.go b/site.go index bd5fc91..215ab8f 100644 --- a/site.go +++ b/site.go @@ -121,16 +121,9 @@ func LoadSite(config string) (*Site, error) { } } - // deprecate [feeds] + // Print deprecation warning for [feeds] if len(site.Feeds) > 0 { - log.Println("The [feeds] configuration is deprecated") - for _, task := range site.Tasks { - if len(task.Feeds) > 0 { - log.Println("and can't be used along [[tasks.feeds]]") - return nil, fmt.Errorf("please remove (or rename) the [feeds] category") - } - } - log.Println("Please replace it with [[tasks.feeds]] in every task needing feeds:") + log.Println("WARNING: The [feeds] configuration is deprecated. Please use [[tasks.feeds]] instead:") for permalink, title := range site.Feeds { dir := strings.Trim(permalink, "/") output := path.Join(dir, "atom.xml") @@ -142,7 +135,8 @@ output = %q `, dir, title, output) } - log.Println("You will also need to change .Entries to .Pages in \"atom.xml\"") + + fmt.Fprintf(log.Writer(), "# NOTE: You will also need to use .Pages instead of .Entries in your feed templates\n") } return site, nil