[READ-ONLY] Mirror of https://github.com/plttn/mkd.
0

Configure Feed

Select the types of activity you want to include in your feed.

Add json to ignore fix date on `new`

Jack Platten (May 24, 2026, 5:54 PM -0700) 53e4cf04 62e4c44c

+31 -3
+8
.changeset/README.md
··· 1 + # Changesets 2 + 3 + Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 + with multi-package repos, or single-package repos to help you version and publish your code. You can 5 + find the full documentation for it [in our repository](https://github.com/changesets/changesets). 6 + 7 + We have a quick list of common questions to get you started engaging with this project in 8 + [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md).
+5
.changeset/chubby-suits-hammer.md
··· 1 + --- 2 + "@plttn/mkd": minor 3 + --- 4 + 5 + Use sentinel date when creating post
+11
.changeset/config.json
··· 1 + { 2 + "$schema": "https://unpkg.com/@changesets/config@3.1.4/schema.json", 3 + "changelog": "@changesets/cli/changelog", 4 + "commit": false, 5 + "fixed": [], 6 + "linked": [], 7 + "access": "restricted", 8 + "baseBranch": "main", 9 + "updateInternalDependencies": "patch", 10 + "ignore": [] 11 + }
+1
.gitignore
··· 2 2 node_modules 3 3 /test 4 4 tsconfig.tsbuildinfo 5 + mkd.json
+2 -2
src/commands/new.ts
··· 43 43 config: Config, 44 44 ): Promise<string> { 45 45 const description = await makeDescription(title); 46 - const now = new Date(); 46 + // const now = new Date(); 47 47 48 48 const data = { 49 49 [config.titleKey]: title, 50 - [config.publishedAtKey]: now, 50 + [config.publishedAtKey]: "3000-01-01T00:00:00Z", 51 51 [config.authorKey]: config.author, 52 52 [config.draftKey]: true, 53 53 [config.descriptionKey]: description,
+4 -1
src/commands/publish.ts
··· 4 4 isCancel, 5 5 intro, 6 6 outro, 7 + autocomplete, 7 8 } from "@clack/prompts"; 8 9 import matter from "gray-matter"; 9 10 import type { Config, Deps } from "../lib/deps"; ··· 41 42 const options = postsToOptions(drafts, config); 42 43 intro("Publishing posts"); 43 44 44 - const selected = await autocompleteMultiselect({ 45 + const selected = await autocomplete({ 45 46 message: "Select posts to publish", 46 47 options, 47 48 }); ··· 57 58 } 58 59 59 60 async function updateDraftFrontMatter(draft: Post, deps: Deps) { 61 + const now = new Date(); 60 62 const parsed = matter(draft.content); 61 63 const fm = parsed.data as Record<string, unknown>; 62 64 fm[deps.config.draftKey] = false; 65 + fm[deps.config.publishedAtKey] = now; 63 66 const updatedContent = matter.stringify(parsed.content, fm); 64 67 await deps.pfs.write(`${deps.config.blogDir}/${draft.file}`, updatedContent); 65 68 return { ...draft, content: updatedContent };