}
selects() {
+ let communityRss = communityRSSUrl(
+ this.state.communityRes.community_view.community.actor_id,
+ this.state.sort
+ );
return (
<div class="mb-3">
<span class="mr-3">
<span class="mr-2">
<SortSelect sort={this.state.sort} onChange={this.handleSortChange} />
</span>
- <a
- href={communityRSSUrl(
- this.state.communityRes.community_view.community.actor_id,
- this.state.sort
- )}
- title="RSS"
- rel="noopener"
- >
+ <a href={communityRss} title="RSS" rel="noopener">
<Icon icon="rss" classes="text-muted small" />
</a>
+ <link rel="alternate" type="application/atom+xml" href={communityRss} />
</div>
);
}
}
selects() {
+ let allRss = `/feeds/all.xml?sort=${this.state.sort}`;
+ let localRss = `/feeds/local.xml?sort=${this.state.sort}`;
+ let frontRss = UserService.Instance.myUserInfo
+ ? `/feeds/front/${UserService.Instance.auth}.xml?sort=${this.state.sort}`
+ : "";
+
return (
<div className="mb-3">
<span class="mr-3">
<SortSelect sort={this.state.sort} onChange={this.handleSortChange} />
</span>
{this.state.listingType == ListingType.All && (
- <a
- href={`/feeds/all.xml?sort=${this.state.sort}`}
- rel="noopener"
- title="RSS"
- >
- <Icon icon="rss" classes="text-muted small" />
- </a>
+ <>
+ <a href={allRss} rel="noopener" title="RSS">
+ <Icon icon="rss" classes="text-muted small" />
+ </a>
+ <link rel="alternate" type="application/atom+xml" href={allRss} />
+ </>
)}
{this.state.listingType == ListingType.Local && (
- <a
- href={`/feeds/local.xml?sort=${this.state.sort}`}
- rel="noopener"
- title="RSS"
- >
- <Icon icon="rss" classes="text-muted small" />
- </a>
+ <>
+ <a href={localRss} rel="noopener" title="RSS">
+ <Icon icon="rss" classes="text-muted small" />
+ </a>
+ <link rel="alternate" type="application/atom+xml" href={localRss} />
+ </>
)}
{UserService.Instance.myUserInfo &&
this.state.listingType == ListingType.Subscribed && (
- <a
- href={`/feeds/front/${UserService.Instance.auth}.xml?sort=${this.state.sort}`}
- title="RSS"
- rel="noopener"
- >
- <Icon icon="rss" classes="text-muted small" />
- </a>
+ <>
+ <a href={frontRss} title="RSS" rel="noopener">
+ <Icon icon="rss" classes="text-muted small" />
+ </a>
+ <link
+ rel="alternate"
+ type="application/atom+xml"
+ href={frontRss}
+ />
+ </>
)}
</div>
);
}
render() {
+ let inboxRss = `/feeds/inbox/${UserService.Instance.auth}.xml`;
return (
<div class="container">
{this.state.loading ? (
<h5 class="mb-2">
{i18n.t("inbox")}
<small>
- <a
- href={`/feeds/inbox/${UserService.Instance.auth}.xml`}
- title="RSS"
- rel="noopener"
- >
+ <a href={inboxRss} title="RSS" rel="noopener">
<Icon icon="rss" classes="ml-2 text-muted small" />
</a>
+ <link
+ rel="alternate"
+ type="application/atom+xml"
+ href={inboxRss}
+ />
</small>
</h5>
{this.state.replies.length +
}
selects() {
+ let profileRss = `/feeds/u/${this.state.userName}.xml?sort=${this.state.sort}`;
+
return (
<div className="mb-2">
<span class="mr-3">{this.viewRadios()}</span>
hideHot
hideMostComments
/>
- <a
- href={`/feeds/u/${this.state.userName}.xml?sort=${this.state.sort}`}
- rel="noopener"
- title="RSS"
- >
+ <a href={profileRss} rel="noopener" title="RSS">
<Icon icon="rss" classes="text-muted small mx-2" />
</a>
+ <link rel="alternate" type="application/atom+xml" href={profileRss} />
</div>
);
}