Skip to content

Add blog series feature#525

Draft
digitaldirk wants to merge 2 commits into
linkdotnet:masterfrom
digitaldirk:blog-series-feature
Draft

Add blog series feature#525
digitaldirk wants to merge 2 commits into
linkdotnet:masterfrom
digitaldirk:blog-series-feature

Conversation

@digitaldirk

@digitaldirk digitaldirk commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Closes #523 (potential future improvements still in 523)

The changes for the files in the Persistence folder I am unsure about due to my lack of experience, disclaimer used AI to generate those changes. I am also curious if how I cache busted is the right way to go (if a series was renamed or deleted - then the blog posts would still have the old name or still be referencing a deleted series)

Added series display for readers on blog posts (if blog is assigned to a series)
image
Admin can assigned blogs to series when creating or editing a blog post, and can reorder posts as well
image
New admin page /series to manage series (add/delete/assign/order)
image

@digitaldirk
digitaldirk marked this pull request as draft July 14, 2026 05:44
@digitaldirk

Copy link
Copy Markdown
Contributor Author

Will fix and add tests through this week

@linkdotnet

Copy link
Copy Markdown
Owner

Hey @digitaldirk thanks very much.
We are of to a good start here!

Here a few high-level things I noticed:

  1. We will need migrations (at least for SQL)
  2. Blog posts in a series have to be taken out from the "SImilar Blog Posts"
    I will add some other critical things inline

foreach (var record in records)
{
await blogDbContext.Set<TEntity>().AddAsync(record);
if (string.IsNullOrEmpty(record.Id))

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if that breaks now the way in SimilarBlogPostJob - we deleted first and then insert. With the same Ids. Might lead to an exception in SQLServer. Have to check

builder.Property(x => x.Tags).HasMaxLength(2048);
builder.Property(x => x.AuthorName).HasMaxLength(256).IsRequired(false);
builder.Property(x => x.SeriesId).IsUnicode(false).IsRequired(false);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might wanna have a db constraint that order has to be unique

@linkdotnet

linkdotnet commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Hey @digitaldirk I am not sure if it makes sense to tackle the series feature beforewe come to a conclusion whether or not the current generic repository pattern is good. I will open a follow up discussion - if we tackle it or not let's see.

@linkdotnet

linkdotnet commented Jul 17, 2026

Copy link
Copy Markdown
Owner

One way forward in the current architecture and still make it work without all the weird quirks is to inject IRepository<Series> and get the SeriesId from BlogPost and gather this via GetById.

That would resolve at least all the bigger issues - no need of typeof - as I also would eliminate the navigation property. Just storing the SeriesId is "good enough" in this case.

Would that work for you @digitaldirk ?

SimilarBlogPosts does a similar thing here (not the same, but comparable)

@digitaldirk

Copy link
Copy Markdown
Contributor Author

Would that work for you @digitaldirk ?

SimilarBlogPosts does a similar thing here (not the same, but comparable)

Yes that is fine by me - reflecting on what was said in the discussion - a full rework would be nice but how many more features like this can a blog have that could benefit from all that work? Can't think of too much because a blog engine should be pretty simple. I think working with what we have now and adjusting this PR is probably the better option.

Should have time this weekend to work more on this

@linkdotnet

Copy link
Copy Markdown
Owner

It is fair for me if you wanna postpone work on that - I am not sure if I can find the time in the close future. So we might have to put this on ice for quite a bit.

On the flip-side, I don't think the migration to a newer system becomes much more complicated with the series feature (but it is also not 0 effort - so maybe I regret what I am saying right now later :D).

@digitaldirk

digitaldirk commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

No worries at all, in the meantime I will improve the user experience and fix bugs of this PR.

TODO:

  • Add example series to dummy data
  • Fix series order bugs when adding/reordering
  • Improve /series user experience (make the page more clear)
  • Add and fix tests
  • Add links on series page to the blog posts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blog series feature

2 participants