Skip to content

x/website: /blog/feed.atom missing an author field #68869

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gudvinr opened this issue Aug 14, 2024 · 4 comments
Closed

x/website: /blog/feed.atom missing an author field #68869

gudvinr opened this issue Aug 14, 2024 · 4 comments
Labels
NeedsFix The path to resolution is known, but the work has not been done. website
Milestone

Comments

@gudvinr
Copy link

gudvinr commented Aug 14, 2024

What is the URL of the page with the issue?

https://go.dev/blog/feed.atom

What is your user agent?

Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0

Screenshot

n/a

What did you do?

  1. Download an Atom feed

What did you expect to see?

<author></author> for an entry that has same value as an author of corresponding article.

Example:

  • https://go.dev/blog/go1.23 has an author "Dmitri Shuralyov, on behalf of the Go team"
  • atom entry with <author><name>Dmitri Shuralyov</name></author>

What did you see instead?

Atom entry for https://go.dev/blog/go1.23 contains <author><name/></author>

atom specs has the following:

  • A feed may have multiple author elements. A feed must contain at least one author element unless all of the entry elements contain at least one author element.
  • <author> and <contributor> describe a person, corporation, or similar entity. It has one required element, name, and two optional elements: uri, email.
  • <name> conveys a human-readable name for the person.

So, in conclusion, feed.atom doesn't follow the spec.
While <entry> elements do have <author> elements and technically <name> is filled, it is filled by nothing which is not "a human-readable name for the person"

@gopherbot gopherbot added this to the Unreleased milestone Aug 14, 2024
@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 14, 2024
@cagedmantis
Copy link
Contributor

cc @golang/tools-team

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/605537 mentions this issue: internal/blog: populate author names in feeds

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. FixPending Issues that have a fix which has not yet been reviewed or submitted. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Aug 15, 2024
gopherbot pushed a commit to golang/website that referenced this issue Aug 16, 2024
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>
@dmitshur dmitshur removed the FixPending Issues that have a fix which has not yet been reviewed or submitted. label Aug 16, 2024
@gudvinr
Copy link
Author

gudvinr commented Aug 20, 2024

image

Works for me.

I'd rather have something more compact, like "Sir Lancelot (Go team)" or just "Sir Lancelot" since it's "Go team" blog anyway, but better than nothing.

@ansaba
Copy link

ansaba commented Aug 22, 2024

Closing it as the issue has been resolved.

@ansaba ansaba closed this as completed Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done. website
Projects
None yet
Development

No branches or pull requests

5 participants