Rename postsPath to defaultPath, remove date requirement from postFilename
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user