You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To have my blog posts appear on my top-level domain, danielraffel.me, without showing any of the posts tagged as links.
I want to host a custom page at /links/ that specifically renders posts tagged as links.
Most importantly, and this is where I'm encountering issues, I want each of these pages to have their own custom RSS feeds, linked in the site metadata using ghost_head.
Now, the issue I'm facing: The {{ghost_head}} element is generating metadata that links to a generic RSS feed on every page of my website. For instance, in routes.yaml, this corresponds to the home/rss template. I'm struggling to figure out how to modify ghost_head or the default.hbs file to ensure that the page at http://danielraffel.me/links/ has metadata directing to its specific RSS feed at http://danielraffel.me/links/rss, as defined under the links/rss template in routes.yaml. It seems ghost_head defaults to using the home/rss everywhere, and I can't find a way to override this on the links page.
What works: Visiting the main URL, http://danielraffel.me, and adding it to a feed reader correctly redirects to http://danielraffel.me/rss, thanks to the {{ghost_head}} tag and the home/rss template in routes.yaml.
What doesn’t work: When accessing http://danielraffel.me/links and using this URL in a feed reader, it incorrectly redirects to http://danielraffel.me/rss. This is because the {{ghost_head}} tag, in conjunction with the home/rss template in routes.yaml, generates the same link tag as the main page. Ideally, it should be using the links/rss template specified in routes.yaml for this URL.
I'm stumped on how to get ghost_head to recognize the custom RSS feed for the route I'm currently on.
Here's the relevant section of my routes.yaml file for reference:
To replicate the issue I'm facing, here are the steps I took:
I created a links.hbs page specifically designed to show only posts tagged with links.
In my routes.yaml, I set up two collections to manage how posts are displayed:
a) I configured the root path / with a filter to exclude any posts tagged as links.
b) I then set up /links/ to only display posts with the links tag.
I created two separate RSS feeds: one at /rss/ for my main content and the other at /links/rss for my links content. I made sure to include links to these feeds in my routes.yaml.
After restarting Ghost, I did two checks:
a) Using a feed reader, I confirmed that accessing domain.com/rss displayed content from my main blog, while domain.com/links/rss showed the content tagged as links.
b) However, when I checked the rendered HTML of both domain.com and domain.com/links, I found an issue. Both pages linked to domain.com/rss in their metadata.
What I expected in step 4b was that domain.com would link to domain.com/rss and domain.com/links would link to domain.com/links/rss, reflecting their respective content. However, it appears that the ghost_head helper is not recognizing the distinction between these two unique RSS feeds, leading to this unexpected behavior.
Ghost Version
5.77.0
Node.js Version
18
How did you install Ghost?
npm install ghost-cli@latest -g on ubuntu 22.04
Database type
MySQL 8
Browser & OS version
Safari 17 and macOS Sonoma 14.3
Relevant log / error output
No response
Code of Conduct
I agree to be friendly and polite to people in this repository
The text was updated successfully, but these errors were encountered:
danielraffel
changed the title
{{ghost_head}} doesn't recognize custom rss feed for the route you’re on
{{ghost_head}} doesn't recognize custom rss feed for the route I am on
Jan 29, 2024
Hey @danielraffel 👋 We ask that you please do not use GitHub for help or support 😄. We use GitHub solely for bug-tracking and community-driven development.
Many questions can be answered by reviewing our documentation. If you can't find an answer then our forum is a great place to get community support, plus it helps create a central location for searching problems/solutions.
FYI: Many projects use issue templates to point you in the right direction. Reading the guidelines or issue templates before opening issues can save you and project maintainers valuable time.
Actually, this could be seen either as a bug or as a feature request, depending on one's perspective. {{ghost_head}} fails to acknowledge the custom RSS feed for the route. Although I've come across a temporary solution, I believe it's worth re-examining if the root problem was completely grasped (it's excellent if it was and this is the intended solution; otherwise, I'm open to addressing any follow-up questions). I think a fix would be beneficial to others as well.
Issue Summary
I'm encountering a problem with
{{ghost_head}}
not recognizing custom RSS feeds for the route I'm on. Here's a link to my forum post for more context: Configuring Custom RSS Feeds when Using a Custom Page.At a high level, my intentions are:
links
.ghost_head
.First, the good news: I've managed to get both RSS feeds working using filters. The feeds at http://danielraffel.me/rss and http://danielraffel.me/links/rss are correctly displaying content as defined in my routes.yaml.
Now, the issue I'm facing: The
{{ghost_head}}
element is generating metadata that links to a generic RSS feed on every page of my website. For instance, in routes.yaml, this corresponds to the home/rss template. I'm struggling to figure out how to modifyghost_head
or the default.hbs file to ensure that the page at http://danielraffel.me/links/ has metadata directing to its specific RSS feed at http://danielraffel.me/links/rss, as defined under the links/rss template in routes.yaml. It seemsghost_head
defaults to using the home/rss everywhere, and I can't find a way to override this on the links page.What works: Visiting the main URL, http://danielraffel.me, and adding it to a feed reader correctly redirects to http://danielraffel.me/rss, thanks to the
{{ghost_head}}
tag and thehome/rss
template inroutes.yaml
.What doesn’t work: When accessing http://danielraffel.me/links and using this URL in a feed reader, it incorrectly redirects to http://danielraffel.me/rss. This is because the
{{ghost_head}}
tag, in conjunction with thehome/rss
template inroutes.yaml
, generates the same link tag as the main page. Ideally, it should be using thelinks/rss
template specified inroutes.yaml
for this URL.I'm stumped on how to get
ghost_head
to recognize the custom RSS feed for the route I'm currently on.Here's the relevant section of my
routes.yaml
file for reference:Steps to Reproduce
To replicate the issue I'm facing, here are the steps I took:
links
.a) I configured the root path
/
with a filter to exclude any posts tagged aslinks
.b) I then set up
/links/
to only display posts with thelinks
tag./rss/
for my main content and the other at/links/rss
for my links content. I made sure to include links to these feeds in my routes.yaml.a) Using a feed reader, I confirmed that accessing domain.com/rss displayed content from my main blog, while domain.com/links/rss showed the content tagged as
links
.b) However, when I checked the rendered HTML of both domain.com and domain.com/links, I found an issue. Both pages linked to domain.com/rss in their metadata.
What I expected in step 4b was that domain.com would link to domain.com/rss and domain.com/links would link to domain.com/links/rss, reflecting their respective content. However, it appears that the
ghost_head
helper is not recognizing the distinction between these two unique RSS feeds, leading to this unexpected behavior.Ghost Version
5.77.0
Node.js Version
18
How did you install Ghost?
npm install ghost-cli@latest -g on ubuntu 22.04
Database type
MySQL 8
Browser & OS version
Safari 17 and macOS Sonoma 14.3
Relevant log / error output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: