Skip to content

feed: more icons, alternate links, etc. #859

Description

@valpackett

Enter your suggestions in details:

Trying to drop custom feed pages in favor of the feed plugin… Currently my JSON Feed looks like:

  const feed = {
    version: "https://jsonfeed.org/version/1.1",
    title: site.feedTitle,
    home_page_url: url("", true),
    feed_url: url("feed.json", true),
    icon: url(site.pfp, true),
    favicon: url(site.pfp, true),
    authors: [{
      name: site.author,
      url: url("", true),
      avatar: url(site.pfp, true),
    }],
// …
  }

The missing things I'm seeing in the plugin:

  • icon (non-favicon) is a JSON Feed field for a potentially larger icon, doesn't seem supported
  • authors.0.avatar is a JSON Feed field for a profile picture, doesn't seem supported

UPD also, for the Atom <link>s, linking to other feed types and to an HTML page…

      link: [
        {
          "@href": url("/blog/", true),
          "@rel": "alternate",
          "@type": "text/html",
        },
        {
          "@href": url("/feed.json", true),
          "@rel": "alternate",
          "@type": "application/feed+json",
        },
        {
          "@href": url(page.url, true),
          "@rel": "self",
          "@type": "application/atom+xml",
        },
      ],

UPD oh btw updated is required in Atom, instead of updated: item.updated?.toISOString(), it should be updated: (item.updated ?? item.date).toISOString(),

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions