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

Function getPostTextContent

packages/webapp/components/PostSEOSchema.tsx:63–79  ·  view source on GitHub ↗
(post: Post)

Source from the content-addressed store, hash-verified

61 * Get the text content for a post (used in DiscussionForumPosting)
62 */
63const getPostTextContent = (post: Post): string => {
64 // For freeform posts, use summary or description
65 if (post?.summary) {
66 return post.summary;
67 }
68
69 if (post?.description) {
70 return post.description;
71 }
72
73 // For share posts, describe what's being shared
74 if (post?.sharedPost?.title) {
75 return `Shared: ${post.sharedPost.title}`;
76 }
77
78 return getSeoDescription(post);
79};
80
81/**
82 * Build Person schema for an author (reusable for posts and comments)

Callers 1

Calls 1

getSeoDescriptionFunction · 0.85

Tested by

no test coverage detected