MCPcopy Create free account
hub / github.com/dailydotdev/apps / buildBody

Function buildBody

packages/webapp/lib/postMarkdown.ts:284–298  ·  view source on GitHub ↗
(post: PostMarkdownPost)

Source from the content-addressed store, hash-verified

282};
283
284const buildBody = (post: PostMarkdownPost): string[] => {
285 const content = nativeContent(post);
286
287 if (content) {
288 return ['## Content', '', content];
289 }
290
291 const url = sourceUrl(post);
292
293 return [
294 '## Full article',
295 '',
296 `daily.dev links to this article rather than hosting it. Read it at the original source: <${url}>`,
297 ];
298};
299
300const buildSummary = (post: PostMarkdownPost): string[] => {
301 const summary = post.summary || post.sharedPost?.summary || post.description;

Callers 1

buildPostMarkdownFunction · 0.85

Calls 2

nativeContentFunction · 0.85
sourceUrlFunction · 0.85

Tested by

no test coverage detected