Support backdated post publishing #250

Open
opened 2026-07-03 15:45:07 -05:00 by erik · 1 comment
Owner

Goal

Add Slugkit API and CLI support for preserving original publish dates when migrating a blog from another system.

Requirements

  • Support setting an explicit publish timestamp for posts, links, and notes.
  • The feature must work for migration/import workflows where content should appear published at its original date instead of the current server time.
  • Add API contract support for explicit publish dates in the appropriate post create, update, or publish flow.
  • Add CLI support, likely via an option such as --published-at <datetime> or --date <date>, with clear validation and help text.
  • Preserve existing default behavior: publishing without an explicit timestamp uses the current server time.
  • Avoid accidentally federating/import-notifying old migrated content unless the contract explicitly says to do so.
  • Document the migration/backdating workflow.

Acceptance criteria

  • Slugkit posts API spec documents how clients set an explicit publish timestamp.
  • Template site implements explicit publish timestamp support for articles, links, and notes.
  • slug CLI can create or publish content with a caller-provided publish date/time.
  • Invalid dates are rejected with standardized validation errors.
  • Existing publish behavior without an explicit timestamp is unchanged.
  • Migration/backdating behavior is documented, including federation/notification expectations for imported old content.
  • Tests cover explicit publish timestamps for create/publish paths and CLI argument handling.

Dependencies

  • None
## Goal Add Slugkit API and CLI support for preserving original publish dates when migrating a blog from another system. ## Requirements - Support setting an explicit publish timestamp for posts, links, and notes. - The feature must work for migration/import workflows where content should appear published at its original date instead of the current server time. - Add API contract support for explicit publish dates in the appropriate post create, update, or publish flow. - Add CLI support, likely via an option such as `--published-at <datetime>` or `--date <date>`, with clear validation and help text. - Preserve existing default behavior: publishing without an explicit timestamp uses the current server time. - Avoid accidentally federating/import-notifying old migrated content unless the contract explicitly says to do so. - Document the migration/backdating workflow. ## Acceptance criteria - [ ] Slugkit posts API spec documents how clients set an explicit publish timestamp. - [ ] Template site implements explicit publish timestamp support for articles, links, and notes. - [ ] `slug` CLI can create or publish content with a caller-provided publish date/time. - [ ] Invalid dates are rejected with standardized validation errors. - [ ] Existing publish behavior without an explicit timestamp is unchanged. - [ ] Migration/backdating behavior is documented, including federation/notification expectations for imported old content. - [ ] Tests cover explicit publish timestamps for create/publish paths and CLI argument handling. ## Dependencies - None
Author
Owner

Synced from todu comment by @todu on 2026-07-03T21:16:21.470Z

PR review complete

  • PR: #251 Support backdated post publishing
  • Review: approved for merge
  • CI: Forgejo run #373 passed
  • Verification: local ./scripts/pre-pr.sh passed; package dry-runs passed for @evcraddock/slug-template@0.1.3 and @evcraddock/slug-cli@0.6.3.
  • Acceptance criteria covered: optional publishedAt API spec, template support for create/update/publish, CLI --published-at, invalid date validation, unchanged default publish behavior, migration/federation docs, and tests for API/CLI behavior.

Waiting for explicit human merge approval.

_Synced from todu comment by @todu on 2026-07-03T21:16:21.470Z_ ### PR review complete - PR: #251 Support backdated post publishing - Review: approved for merge - CI: Forgejo run #373 passed - Verification: local `./scripts/pre-pr.sh` passed; package dry-runs passed for `@evcraddock/slug-template@0.1.3` and `@evcraddock/slug-cli@0.6.3`. - Acceptance criteria covered: optional `publishedAt` API spec, template support for create/update/publish, CLI `--published-at`, invalid date validation, unchanged default publish behavior, migration/federation docs, and tests for API/CLI behavior. Waiting for explicit human merge approval.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
erik/slugkit#250
No description provided.