Skip to content
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

RSS2 feed should use id instead of feed #152

Open
jooola opened this issue May 24, 2021 · 0 comments
Open

RSS2 feed should use id instead of feed #152

jooola opened this issue May 24, 2021 · 0 comments

Comments

@jooola
Copy link
Contributor

jooola commented May 24, 2021

Describe the bug

I am sure if the RSS feed should use FeedOptions.id instead of FeedOptions.feed, as the feed attribute is only used by rss2 and the id attribute is used by json and atom.

The Id is usually an URL to the website, but is it safe to say that it will always be an URL ? If yes, we could use the ID in the RSS2 feed as well.

This is the only place the feed attribute is used, in rss2.ts

  /**
   * Feed URL
   * http://validator.w3.org/feed/docs/warning/MissingAtomSelfLink.html
   */
  const atomLink = options.feed || (options.feedLinks && options.feedLinks.rss);
  if (atomLink) {
    isAtom = true;
    base.rss.channel["atom:link"] = [
      {
        _attributes: {
          href: sanitize(atomLink),
          rel: "self",
          type: "application/rss+xml",
        },
      },
    ];
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant