website/internal/blog
Dmitri Shuralyov d43f0ec556 internal/blog: populate author names in feeds
Go blog posts have metadata like:

by:
- Author Name
- Maybe Another Author

Those YAML lists were decoded into a slice of empty interfaces, each
holding a string, and all that was being ignored. Update it to parse
the []any type of p["by"] and to return an error if there aren't any
authors. There are only 2 existing blog posts that cause such errors,
but they're very old and can be ignored (or updated if needed).

There's probably more that can be done, like having one <author> XML
item per 'by' item in the YAML/JSON metadata of blog posts, but this
is a reasonable step forward.

For golang/go#68869.

Change-Id: I7b97a09b006bacf4835442a749cb0e467c7dbb47
Reviewed-on: https://go-review.googlesource.com/c/website/+/605537
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Hongxiang Jiang <hxjiang@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
2024-08-16 19:56:31 +00:00
..
atom cmd/golangorg: move blog from blog.golang.org to go.dev/blog 2021-08-18 19:48:35 +00:00
blog.go internal/blog: populate author names in feeds 2024-08-16 19:56:31 +00:00