Rename postsPath to defaultPath, remove date requirement from postFilename

This commit is contained in:
2026-08-09 14:21:02 -04:00
parent 06350d6c62
commit 87d27f2f4c
5 changed files with 15 additions and 8 deletions

View File

@@ -51,9 +51,9 @@ export async function publish(
});
const postText = buildPost({ frontmatterPairs: input.frontmatterPairs, body: rewrittenBody });
const postPath = `${settings.postsDir}/${postFilename({ date: input.date, slug: input.slug })}`;
const notePath = `${settings.defaultPublishDir}/${postFilename({ date: input.date, slug: input.slug })}`;
const files: GitFile[] = [{ repoPath: postPath, data: postText }];
const files: GitFile[] = [{ repoPath: notePath, data: postText }];
for (const item of plan) {
const r = resolved.find((x) => x.linktext === item.linktext)!;
files.push({ repoPath: item.repoPath, data: r.data });
@@ -68,5 +68,5 @@ export async function publish(
authorEmail: settings.authorEmail || undefined,
});
return { postPath, imageCount: plan.length, unresolved };
return { postPath: notePath, imageCount: plan.length, unresolved };
}