Skip to content

Add article status (current/archive/draft) with per-environment draft visibility - #5

Merged
mwamodo merged 3 commits into
masterfrom
turbine
Sep 1, 2026
Merged

Add article status (current/archive/draft) with per-environment draft visibility#5
mwamodo merged 3 commits into
masterfrom
turbine

Conversation

@mwamodo

@mwamodo mwamodo commented Sep 1, 2026

Copy link
Copy Markdown
Member

Summary

Sync from Turbine (platform/markdown-blog). Three commits on turbine since the last merge:

  • b33b93c Add current/archive status to markdown-blog articles
  • 2998621 Add local-only draft status to markdown-blog
  • cc3c844 Add per-environment control for markdown-blog draft visibility

What changes

  • Articles can declare a status (current, archive, draft); unknown values are handled explicitly
  • draft articles are local-only by default; visibility is now controlled per environment via config/markdown-blog.php
  • ArticleRepository, MarkdownBlog, the facade, and the service provider are updated to expose/filter by status
  • README documents the new front-matter field and config key

Tests

tests/ArticleRepositoryTest.php extended with new fixtures: archived-post, draft-post, unknown-status.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NwAY957w9p7RaAUNDkssiA

cursoragent and others added 3 commits August 30, 2026 08:36
Frontmatter status defaults to current. archive is the only other
recognized value. Consumers can list with current() and archived()
without changing all() or slug lookup.

Co-authored-by: Eric Mwamodo <mwamodo@users.noreply.github.com>
Recognize status: draft alongside current and archive. Drafts appear
in all(), drafts(), listed(), and findBySlug only when APP_ENV=local.
Missing or unknown status still defaults to current; new posts should
set draft.

Co-authored-by: Eric Mwamodo <mwamodo@users.noreply.github.com>
- Introduces a `show_drafts` config flag so drafts can be forced on/off
  independent of `APP_ENV`, instead of always gating on `local`.
- Caches the articles directory scan per repository instance to avoid
  redundant filesystem walks across repeated calls.
- Refreshes the blog fixture content (Beacon 0.3.3-beta note, archived
  REST/MCP post) and OG images, with new tests covering the archive
  listing, OG image presence, and drafts scan caching.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approved. Cursor Bugbot was not present after the first check poll, so that signal was skipped; PHP 8.3 and 8.4 passed and no approval policy requires human review. No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@mwamodo
mwamodo merged commit 763d961 into master Sep 1, 2026
3 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