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

Detect RSS on a page and make it visible #63

Open
rodarima opened this issue Jan 14, 2024 · 4 comments
Open

Detect RSS on a page and make it visible #63

rodarima opened this issue Jan 14, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@rodarima
Copy link
Member

rodarima commented Jan 14, 2024

From https://alpha.polymaths.social/@amin/statuses/01HH6G3MX196P4AWMT7CA7SB2R

A neat thing about lynx I've noticed is that it makes the link to the RSS feed (which I mentioned the syntax for to you earlier) visible, as "#RSS", the first thing on the page. I rather like that. Wish browsers were better about integrating feed-related features.

We may be able to integrate such feature by adding a plugin that rewrites the head link tag into something visible in the body. The links have this look:

<link rel="alternate" type="application/rss+xml" href="/feed.xml" />

Would require to have #56 working.

@rodarima rodarima added the enhancement New feature or request label Jan 14, 2024
@benjaminbhollon
Copy link

A note; looks like lynx uses the title attribute of these links as the link text. I have multiple feeds on https://benjaminhollon.com, for example, with different titles, and it uses the titles I set. :)

@rodarima
Copy link
Member Author

Thanks, I leave here a picture of lynx for reference:

rss

With the following link tags:

<link rel="alternate" type="application/atom+xml" title="Musings Blog Atom Feed" href="https://benjaminhollon.com/musings/feed/">
<link rel="alternate" type="application/atom+xml" title="Aggregrated Atom Feeds" href="https://benjaminhollon.com/feed/?from=musings%2Ctty1%2Cpoetry%2Cblurbs">
<link rel="alternate" hreflang="en" href="http://localhost/">

This should be doable with a small plugin that rewrites the HTML, parsing the link tags and injects them in the body with the proper title and hyperlinks. We still need to work in the infrastructure to make rewriting HTML easier.

@benjaminbhollon
Copy link

benjaminbhollon commented Jan 15, 2024

Huh, that last alternate link is odd. Not sure why it's there.

I'll check my site's code. Wasn't expecting to find an issue via this issue. XD

Edit: looks like it's from my SSG's multilanguage plugin, but with the root domain messed up. (Also not sure why it's adding it with the current page language.)

Might be worth excluding rel="alternate" links that have the hreflang attribute, or displaying them differently, since those are links to alternate translations of the page.

@rodarima
Copy link
Member Author

I'll check my site's code. Wasn't expecting to find an issue via this issue. XD

Sometimes it happens :-)

Might be worth excluding rel="alternate" links that have the hreflang attribute, or displaying them differently, since those are links to alternate translations of the page.

Yeah, probably we should first only focus on application/atom+xml and exclude everything else. In Dillo there is already a hack to inject a table at the beginning of a page to "support" the meta refresh tag, but I want to use this as an example to make the design of plugins that can do those tasks, instead of making more hacks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants