Skip to content

Commit

Permalink
feat(endpoint-micropub): remove server commands from post template pr…
Browse files Browse the repository at this point in the history
…operties
  • Loading branch information
paulrobertlloyd committed Jan 10, 2024
1 parent 364b2fb commit 128299c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/endpoint-micropub/lib/post-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ export const postContent = {
fileType: "post",
postType: properties["post-type"],
};
const content = await postTemplate(properties);

// Remove server commands from post template properties
const templateProperties = Object.keys(properties).filter(
(key) => !key.startsWith("mp-"),
);

const content = await postTemplate(templateProperties);
const message = storeMessageTemplate(metaData);

await store.createFile(path, content, { message });
Expand Down

0 comments on commit 128299c

Please sign in to comment.