linkdotnet / Blog

A blog (engine) completely written in C# and Blazor. It aims to be a simple use and easy to extend platform. Blogposts are written in Markdown and are rendered to HTML. This gives all the flexibility needed to express yourself but also have an easy way of creating posts in the first place.
https://steven-giesel.com/
MIT License
287 stars 51 forks source link

feature: upgrade rss behaviour #347

Closed elementh closed 4 weeks ago

elementh commented 1 month ago

Progress:


Will close #343

elementh commented 1 month ago

@linkdotnet I'm having trouble with debugging during developmentā€”neither the project nor the tests will debug, and it just silently stops. I'm using Rider on Linux. Any ideas on what I might be missing?

linkdotnet commented 1 month ago

I do think that is a short-coming from Rider with the current net9.0 preview. I also experience this with Rider on MacOS arm64.

Might be worth to open a issue (it seems to be related to Blazor, because my blog is the only project I can't debug ATM).

linkdotnet commented 1 month ago

I also have the same issue if I just create a new xUnit project with net9.0. Will file a report.

elementh commented 1 month ago

I just added the dropdown with both RSS feeds. It looks nice but I think you should be the one deciding on the names for both feeds.

As of right now, it looks like this:

image

How should we name the links? Also, should we remove the RSS icon on the inner links?

linkdotnet commented 1 month ago

I would call it "Compact" and "Full". We can refer to the readme and add a section there. Given that we will always show all blog posts, or? It just differs whether or not the content is part of the RSS Feed or not.

elementh commented 1 month ago

Given that we will always show all blog posts, or?

Maybe I missunderstood, wasn't it supposed to be a limit (following BlogPostsPerPage or query parameter numberOfBlogPosts) when requesting full content?

linkdotnet commented 1 month ago

Given that we will always show all blog posts, or?

Maybe I missunderstood, wasn't it supposed to be a limit (following BlogPostsPerPage or query parameter numberOfBlogPosts) when requesting full content?

Fair point - yes. That doesn't make the wording easier though.

  1. All Posts (Summary)
  2. Most recent Posts (Full Content)

Something like that?

elementh commented 1 month ago

I like that!

What should we do with the icons inside the dropdown? Stay or go?

linkdotnet commented 1 month ago

I like that!

What should we do with the icons inside the dropdown? Stay or go?

I would say "Bye Bye" given that we already have an icon for the header.

linkdotnet commented 1 month ago

Offtopic: https://youtrack.jetbrains.com/issue/RIDER-116908/Debugging-xUnit-net9.0-tests-will-crash-the-debugger-Mac-OSX-aarch64

If you wanna weigh in

linkdotnet commented 4 weeks ago

@elementh As a heads up: I migrated all tests from FluentAssertions to Shouldly. Also I enabled nullability (that was missing until now for all tests). You might want to rebase/merge from the current master.

elementh commented 4 weeks ago

@linkdotnet sounds great, will do.

I've been trying to do the markup thing as clean as possible, but I run into some problems with the Rss20FeedFormatter, turns out there is a bug from the pre-core days that is still haunting this formatter on which it will format Markup strings wrongly if they are the content of the SyndicationItem (check this link, and this link too).

The old "simple" workarounds don't work anymore, so I have to come up with something else. There is something that would probably work, but it involves creating the feed and then manually replacing content, and that sounds so bad hahaha

elementh commented 4 weeks ago

The force push is for the rebase, sorry.

Okay, everything should be ready and working, please have a look and let me know!

linkdotnet commented 4 weeks ago

The force push is for the rebase, sorry.

I do that all the time. I am "Camp Rebase" ;)

Okay, everything should be ready and working

Could you also add Rate-Limiting for the Controller? In any case - big thanks for the support. I will have a look.

elementh commented 4 weeks ago

Also, checking the feed output with a validator (https://validator.w3.org/feed/check.cgi) tells me that the image element is unknown, and on my RSS Reader I see no images from your blog posts. Should we make it a <img> instead?

elementh commented 4 weeks ago

Could you also add Rate-Limiting for the Controller? In any case - big thanks for the support. I will have a look.

Should we use https://learn.microsoft.com/en-us/aspnet/core/performance/rate-limit or do you prefer any third party packages?

linkdotnet commented 4 weeks ago

Could you also add Rate-Limiting for the Controller? In any case - big thanks for the support. I will have a look.

Should we use https://learn.microsoft.com/en-us/aspnet/core/performance/rate-limit or do you prefer any third party packages?

I would go with the ASP.NET one as you proposed. If you feel very motivated you can even use the WebApplicationFactoryTests (aka SmokeTests) and try to test that (if that is somewhat manageable)

linkdotnet commented 4 weeks ago

Also, checking the feed output with a validator (https://validator.w3.org/feed/check.cgi) tells me that the image element is unknown, and on my RSS Reader I see no images from your blog posts. Should we make it a <img> instead?

Hmmm I initially found that on Stackoverflow. Have to check that with an RSS Feed Reader. If you can confirm that "img" works - go ahead.

linkdotnet commented 4 weeks ago

On feedly it works with the current setup

elementh commented 4 weeks ago

Let's leave it like that then, at least for now!

elementh commented 4 weeks ago

I would go with the ASP.NET one as you proposed. If you feel very motivated you can even use the WebApplicationFactoryTests (aka SmokeTests) and try to test that (if that is somewhat manageable)

I'll do this either this afternoon or tomorrow!

linkdotnet commented 4 weeks ago

I would go with the ASP.NET one as you proposed. If you feel very motivated you can even use the WebApplicationFactoryTests (aka SmokeTests) and try to test that (if that is somewhat manageable)

I'll do this either this afternoon or tomorrow!

We can also do this in a follow up PR if you wish

elementh commented 4 weeks ago

Sounds great, should one of us open a new issue for the rate limiting too?

linkdotnet commented 4 weeks ago

Sounds great, should one of us open a new issue for the rate limiting too?

I would keep it open. Just split the feature into 2 sep. PR's

elementh commented 4 weeks ago

I would keep it open. Just split the feature into 2 sep. PR's

Even better :smile: