Skip to content

fix: hide encrypted post summaries#462

Merged
Leaf-0w0 merged 1 commit into
LyraVoid:masterfrom
sleep1223:codex/hide-encrypted-summaries
May 14, 2026
Merged

fix: hide encrypted post summaries#462
Leaf-0w0 merged 1 commit into
LyraVoid:masterfrom
sleep1223:codex/hide-encrypted-summaries

Conversation

@sleep1223
Copy link
Copy Markdown
Contributor

@sleep1223 sleep1223 commented May 13, 2026

Type of change

  • Bug fix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected)
  • Other (please describe):

Checklist

  • I have read the CONTRIBUTING document.
  • I have checked to ensure that this Pull Request is not for personal changes.
  • I have performed a self-review of my own code.
  • My changes generate no new warnings.

Related Issue

N/A

Changes

  • Add hideHomeContent frontmatter support for encrypted posts.
  • Default encrypted posts with a configured password to hide public summary content.
  • Replace public summary output with 该文章已加密 across homepage cards, post lists, detail metadata, feeds, API metadata, OG images, and archive island props.
  • Avoid passing raw post descriptions/password-related data into the archive Svelte island.
  • Add regression tests for default and explicit hideHomeContent behavior.
  • Update the encrypted post example with the new top-level config.

How To Test

  • node --test --experimental-strip-types tests/post-card-content.test.ts
  • pnpm check
  • pnpm build
  • Ran targeted ESLint on changed files; it completed with only existing console warnings in feed/build scripts.
  • Verified built output no longer contains the raw encrypted example summary text.

Screenshots (if applicable)

N/A

Additional Notes

The placeholder text is currently fixed as 该文章已加密, matching the requested display text. A future follow-up can route it through the existing i18n system if maintainers want localized placeholder text.

@sleep1223 sleep1223 marked this pull request as ready for review May 13, 2026 05:42
@Leaf-0w0 Leaf-0w0 merged commit 6dea652 into LyraVoid:master May 14, 2026
4 checks passed
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