Announce a Blog Post Across Multiple Platforms
cast_announce_post.Rd
The announce_post
function automates the
task of announcing a blog post.
It extracts metadata from the post's YAML
front matter, generates relevant
messages, and posts announcements to
various platforms: Bluesky, LinkedIn,
Mastodon, and via newsletter.
Value
The function does not explicitly
return a value (NULL
). It performs
side effects by creating posts on
external platforms and sending out a
newsletter.
Details
Checks that the
post
argument is provided and raises errors or warnings as needed.Reads the YAML front matter of the blog post to extract metadata such as tags, slug, image, and additional fields used for announcements.
Converts tags into a hashtag-based format.
Constructs a shortened URL for the blog post based on its slug.
Posts the announcement to:
Bluesky: Posts a truncated message along with an image.
LinkedIn: Posts the full summary along with an image.
Mastodon: Posts the SEO description, image, and alternative text.
Sends the metadata to generate a newsletter notification.