pluja / blogo

A lightweight blogging engine that backs itself up to Nostr!
https://blogo.site
MIT License
120 stars 10 forks source link

Make feeds auto-discoverable by Feed Readers #3

Closed GreenLunar closed 4 months ago

GreenLunar commented 7 months ago

See https://www.rssboard.org/rss-autodiscovery

GreenLunar commented 7 months ago

The titles are better be different and indicate what's Atom, JSON and RSS.

<link rel="alternate" type="application/atom+xml" title="{{template "title" .}} (Atom)" href="/atom">
<link rel="alternate" type="application/json" title="{{template "title" .}} (JSON)" href="/json">
<link rel="alternate" type="application/rss+xml" title="{{template "title" .}} (RSS)" href="/rss">
pluja commented 7 months ago

Looks good to me, maybe you could add those title changes before I merge, if you think that would be good?

GreenLunar commented 7 months ago

There is another problem with this commit.

If blog is located at https://blogo.site/blog the links above will be redirected to https://blogo.site/rss instead of https://blogo.site/blog/rss.

Solutions: 1) an absolute URL is written there (recommended). 2) Add <base href="https://blogo.site/blog/">.

I prefer solution # 1.

GreenLunar commented 7 months ago

Looks good to me, maybe you could add those title changes before I merge, if you think that would be good?

Dome.

I'm not sure I understand the syntax nor do I have an environment to check this.

Please feel free to make an edit or even make a new PR.

The appearance of my credentials is not crucial to me.

GreenLunar commented 7 months ago

Done.

But I still didn't solve the URL issue.

Could you do it please?

I will make a test whenever you ask.

pluja commented 7 months ago

Since blogo has access to the BLOGO_URL environment variable, that should be set to the actual blogo URL, we can use that. I made a commit, check it out and if you thinks that looks good, I'll merge!

GreenLunar commented 6 months ago

Please pardon me for the late respond.

It looks good to me.

Please apply this to https://blogo.site/ as I'd like to test it.