Skip to content

feat(blog-publish): route LinkedIn cross-post via micro.blog Micropub#45

Merged
superterran merged 1 commit into
mainfrom
feat/microblog-crosspost
May 19, 2026
Merged

feat(blog-publish): route LinkedIn cross-post via micro.blog Micropub#45
superterran merged 1 commit into
mainfrom
feat/microblog-crosspost

Conversation

@superterran
Copy link
Copy Markdown
Contributor

Summary

  • Replace direct LinkedIn UGC Posts API path with a Micropub POST to micro.blog
  • New apps/editorial-loop/lib/microblog-poster.js; linkedin-poster.js deleted
  • blog-publish.yml now gated on vars.MICROBLOG_CROSSPOST_ENABLED == 'true'; uses secrets.MICROBLOG_APP_TOKEN + optional vars.MICROBLOG_DESTINATION_UID
  • Adds workflow_dispatch with optional post_path so any post can be manually cross-posted

Why

LinkedIn access tokens expire every 60 days and need OAuth refresh. Micro.blog app tokens don't expire, and LinkedIn is already configured as a cross-post destination on the micro.blog account — let micro.blog do the syndication.

The pre-generated linkedin_copy frontmatter is still used verbatim (with {{url}} substitution), so the note still ends with Full post: <blog-url>, giving the link back to the long-form post.

Required GitHub config (set after merge)

  • Secret: MICROBLOG_APP_TOKEN (from https://micro.blog/account/apps)
  • Variable: MICROBLOG_CROSSPOST_ENABLED=true
  • Variable: MICROBLOG_DESTINATION_UID — optional, only if the token sees multiple sites

Old LINKEDIN_* secrets/vars can be deleted after the new flow is verified.

Test plan

  • Merge to main
  • Set the secret + var listed above
  • gh workflow run blog-publish.yml -f post_path=content/blog/2026-04-25-devops-matters-more-when-ai-writes-code.md (or via the Actions UI)
  • Confirm the note appears on https://doughatcher.com/
  • Confirm LinkedIn cross-post lands within a minute or two

🤖 Generated with Claude Code

Replace the direct LinkedIn UGC Posts API path with a Micropub POST to
micro.blog. The note lands on doughatcher.com/ (microblog timeline) and
micro.blog syndicates it to LinkedIn (and any other configured cross-post
destinations).

Why: LinkedIn access tokens expire every 60 days and require manual OAuth
refresh. Micro.blog app tokens don't expire, and the user already has
LinkedIn configured as a cross-post destination there.

Changes:
- new apps/editorial-loop/lib/microblog-poster.js (Micropub client)
- apps/editorial-loop/publish.js now imports microblog-poster
- delete apps/editorial-loop/lib/linkedin-poster.js (unused)
- blog-publish.yml: env now MICROBLOG_APP_TOKEN + optional MICROBLOG_DESTINATION_UID,
  gated on vars.MICROBLOG_CROSSPOST_ENABLED
- pre-generated linkedin_copy frontmatter is still used verbatim — field name
  preserved since LinkedIn is still the syndication target

Required GitHub config to enable:
- secret MICROBLOG_APP_TOKEN (from https://micro.blog/account/apps)
- var MICROBLOG_CROSSPOST_ENABLED=true
- var MICROBLOG_DESTINATION_UID (optional; only if token sees multiple sites)
@superterran superterran merged commit 666511c into main May 19, 2026
1 check passed
@superterran superterran deleted the feat/microblog-crosspost branch May 19, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant