feat(blog-publish): route LinkedIn cross-post via micro.blog Micropub#45
Merged
Conversation
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
apps/editorial-loop/lib/microblog-poster.js;linkedin-poster.jsdeletedblog-publish.ymlnow gated onvars.MICROBLOG_CROSSPOST_ENABLED == 'true'; usessecrets.MICROBLOG_APP_TOKEN+ optionalvars.MICROBLOG_DESTINATION_UIDworkflow_dispatchwith optionalpost_pathso any post can be manually cross-postedWhy
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_copyfrontmatter is still used verbatim (with{{url}}substitution), so the note still ends withFull post: <blog-url>, giving the link back to the long-form post.Required GitHub config (set after merge)
MICROBLOG_APP_TOKEN(from https://micro.blog/account/apps)MICROBLOG_CROSSPOST_ENABLED=trueMICROBLOG_DESTINATION_UID— optional, only if the token sees multiple sitesOld
LINKEDIN_*secrets/vars can be deleted after the new flow is verified.Test plan
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)🤖 Generated with Claude Code