feat(newsletter): post a paper or report to LinkedIn as a document - #169
Merged
Merged
Conversation
Buffer's API accepts a document asset (url, title, thumbnail), which LinkedIn shows as a swipeable carousel. When a post folder holds document.pdf, LinkedIn now gets it as a document post with the folder's image as the cover and document-title.txt as its title; X and Bluesky cannot take documents and keep the image. The PDF is hosted the same way as the images, on the newsletter-assets branch behind jsDelivr, which serves it as application/pdf. Used for issue 406's Harness-Zero paper and China's framework PDF.
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.
buffer-post.mjscan now queue a paper or report to LinkedIn as a document post, which LinkedIn shows as a swipeable PDF carousel, while X and Bluesky still get the image.The trigger was issue 406: the owner wanted the Harness-Zero paper and China's framework PDF posted as documents on LinkedIn. Buffer's GraphQL schema has an
AssetInputwith adocumentfield, which I confirmed by introspection before building on it:When a post folder contains
document.pdf, the LinkedIn post gets that as a document, using the folder's image as the cover anddocument-title.txtas its title. The PDF is hosted the same way the images are, on thenewsletter-assetsbranch behind jsDelivr, which serves it asapplication/pdf. Other channels are unchanged. A folder with a PDF but no image fails early, because a document post needs a cover.It's been used for real. All four of issue 406's image posts queued without errors, including the two documents (0.9 MB and 3.3 MB, the second at 136 pages). What isn't verified yet is what LinkedIn renders when Buffer publishes them: the first document post goes out on 2026-09-29, and that's the real test.
Two small follow-ups, not done here. The
newsletter-issueskill doesn't mentiondocument.pdfyet. Andfetch-images --applydoesn't produce the file itself, so for now it's copied into the folder by hand.