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

Deprecate RSSLink #4427

Closed
crgeary opened this issue Feb 19, 2018 · 4 comments
Closed

Deprecate RSSLink #4427

crgeary opened this issue Feb 19, 2018 · 4 comments
Labels
Milestone

Comments

@crgeary
Copy link

crgeary commented Feb 19, 2018

I have added disableKinds = ["RSS"] to my configuration file, which does indeed disable RSS accross the site.

However the following snippet of HTML is still output to the page, even though its wrapped in the conditional check. I would have expected this to be false and for the HTML to not output.

{{ if .RSSLink }}
    <link href="{{ .RSSLink }}" title="{{ .Site.Title }}" type="application/rss+xml" rel="alternate">
{{ end }}

This then causes a 404.

@bep
Copy link
Member

bep commented Feb 19, 2018

You need to do something a la:

https://github.com/gohugoio/hugoDocs/blob/master/themes/gohugoioTheme/layouts/_default/baseof.html#L25

RSSLink will be deprecated and eventually removed.

@bep bep changed the title Disabling RSS feeds should prevent feed <link> tag being output Deprecate RSSLink Feb 19, 2018
@bep bep added this to the v0.37 milestone Feb 19, 2018
@crgeary
Copy link
Author

crgeary commented Feb 19, 2018

Ah, thank you for the quick response 👍

@bep bep modified the milestones: v0.37, v0.38 Feb 21, 2018
@bep bep modified the milestones: v0.38, v0.39 Mar 20, 2018
@bep bep modified the milestones: v0.39, v0.40 Apr 9, 2018
@bep bep modified the milestones: v0.39, v0.40, v0.41 Apr 15, 2018
@bep bep modified the milestones: v0.41, v0.42 May 4, 2018
@bep bep modified the milestones: v0.42, v0.43 Jun 5, 2018
@bep bep modified the milestones: v0.43, v0.44 Jun 30, 2018
@bep bep modified the milestones: v0.44, v0.45, v0.46 Jul 10, 2018
@bep bep modified the milestones: v0.46, v0.47 Aug 3, 2018
@bep bep modified the milestones: v0.47, v0.48 Aug 7, 2018
@bep bep modified the milestones: v0.48, v0.49 Aug 22, 2018
@bep bep modified the milestones: v0.49, v0.50 Sep 13, 2018
@bep bep modified the milestones: v0.50, v0.51 Oct 6, 2018
@bep bep modified the milestones: v0.51, v0.53 Nov 8, 2018
@bep bep modified the milestones: v0.53, v0.54 Dec 6, 2018
@bep bep modified the milestones: v0.54, v0.55 Dec 26, 2018
@bep bep modified the milestones: v0.55, v0.56 Feb 1, 2019
@max-arnold
Copy link
Contributor

The warning in 0.55 is slightly misleading (and this deprecation is not mentioned in the release notes):

WARN 2019/04/09 21:04:47 Page's .RSSLink is deprecated and will be removed in a future release. Use the Output Format's link, e.g. something like:
    {{ with .OutputFormats.Get "RSS" }}{{ . RelPermalink }}{{ end }}.

When I use the recommended snippet I get this:

parse master failed: template: index.html:19: function "RelPermalink" not defined

It looks like the snippet in the warning message needs to be changed to this (no space between the . and RelPermalink):

{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}.

@bep bep closed this as completed in 3b86b4a Apr 9, 2019
digitalcraftsman pushed a commit to digitalcraftsman/hugo-type-theme that referenced this issue Jul 2, 2019
…rmat's link" (#43)

When rendering the site an error occurs:

WARN 2019/07/02 12:11:16 Page's .RSSLink is deprecated and will be removed in a future release. Use the Output Format's link, e.g. something like:
    {{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}.

Related:
- gohugoio/hugo#4427
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants