Skip to content

Add new-post script to scaffold draft posts#54

Merged
riccjohn merged 3 commits intomainfrom
feat/new-post-script
Apr 8, 2026
Merged

Add new-post script to scaffold draft posts#54
riccjohn merged 3 commits intomainfrom
feat/new-post-script

Conversation

@riccjohn
Copy link
Copy Markdown
Owner

@riccjohn riccjohn commented Apr 8, 2026

Summary

  • Adds pnpm new-post "Post Title" script in scripts/new-post.js
  • Slugifies the title to generate the filename
  • Pre-fills title, pubDate (today), and stubs description, updatedDate, heroImage as comments
  • Uses node: protocol on built-in imports (fixes Biome lint warnings)
  • Adds prettier-plugin-organize-imports to sort imports alphabetically on format
  • Adds .prettierignore to exclude pnpm-lock.yaml and .claude/

Usage

pnpm new-post "My Great Post"
# → src/content/blog/my-great-post.mdx

Test plan

  • Run pnpm new-post "Some Title" and verify the file is created at src/content/blog/some-title.mdx with correct frontmatter and today's date
  • Run again with the same title and verify it errors rather than overwriting
  • Run without arguments and verify the usage message is shown
  • Run pnpm prettier:write and verify imports are sorted alphabetically

🤖 Generated with Claude Code

Adds `pnpm new-post "Post Title"` — slugifies the title, fills in today's
date, and creates a prefixed draft file in src/content/blog/.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 8, 2026

Deploy Preview for arcanegrain ready!

Name Link
🔨 Latest commit 85c6a44
🔍 Latest deploy log https://app.netlify.com/projects/arcanegrain/deploys/69d6b2475be20f0008ffa71d
😎 Deploy Preview https://deploy-preview-54--arcanegrain.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100
Accessibility: 97
Best Practices: 100
SEO: 100
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

riccjohn and others added 2 commits April 8, 2026 14:49
@riccjohn riccjohn merged commit 9b2a3e9 into main Apr 8, 2026
5 checks passed
@riccjohn riccjohn deleted the feat/new-post-script branch April 8, 2026 20:10
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.

1 participant