(post: Post)
| 61 | * Get the text content for a post (used in DiscussionForumPosting) |
| 62 | */ |
| 63 | const 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) |
no test coverage detected