Skip to content

refactor: make blog feature and content improvements - #1416

Draft
f15u wants to merge 2 commits into
mainfrom
blog-chores
Draft

refactor: make blog feature and content improvements#1416
f15u wants to merge 2 commits into
mainfrom
blog-chores

Conversation

@f15u

@f15u f15u commented Jul 30, 2026

Copy link
Copy Markdown
Member

Type

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

These are bugs fixed:

  • Featured post no longer duplicated in both hero and grid
  • Prev/Next orientation was inverted (newest-first list, but Previous pointed to the newer post)
  • Trailing slashes on RSS links / share links, conflicting with trailingSlash: "never"
  • Author names weren't XML-escaped in the RSS feed
  • Dates formatted in build-host timezone instead of UTC (off-by-one-day risk)
  • Client hydration mismatch on /blog?category=x (category read from window during the render instead of after)
  • Two client islands serializing overlapping post data → collapsed into one (BlogIndex)
  • getCollection was called once per static page (171×) instead of once
  • Dead readingTime schema field removed; "release" → "releases" typo in suggested tags fixed

Related

  • Related Issue #
  • Closes #

@f15u
f15u requested a review from IMax153 July 30, 2026 16:40
@f15u

f15u commented Jul 31, 2026

Copy link
Copy Markdown
Member Author

@IMax153 I've split up the MR, so this is focused just on the refactor without any other commit.

@IMax153 IMax153 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can the tests live in a separate top-level test dir? I don't like co-locating them in projects.

Comment thread src/features/blog/content.test.ts Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This test feels useless.

Comment thread src/features/blog/repository.ts Outdated
Comment on lines +37 to +53
static readonly layerTest = (fixtures: {
readonly posts?: ReadonlyArray<BlogPostSource> | undefined
readonly tags?: ReadonlyArray<BlogTagSource> | undefined
readonly authors?: ReadonlyArray<BlogAuthorSource> | undefined
}) =>
Layer.succeed(this, {
posts: Effect.succeed(fixtures.posts ?? []),
tags: Effect.succeed(fixtures.tags ?? []),
authors: Effect.succeed(fixtures.authors ?? []),
})

static readonly layerFailing = (error: BlogContentError) =>
Layer.succeed(this, {
posts: Effect.fail(error),
tags: Effect.fail(error),
authors: Effect.fail(error),
})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These layers should probably just be defined in the tests / where they are needed.

@f15u
f15u marked this pull request as draft July 31, 2026 16:48
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.

2 participants