Posting automatically from my blog to LinkedIn

The utilization and benefits of using Quarto for blog-posting technical content on multiple platforms like LinkedIn and Twitter.

Lucas A. Meyer


June 28, 2022

Write once, use everywhere.

One of the things that felt very inefficient to me was to write using several tools, but I recently solved that problem.

Until very recently, I wrote in LinkedIn (I used Buffer), Twitter, my blog (I used GitHub Markdown), my work code (Python and Jupyter). That’s a lot to keep track of. Sometimes, I wanted to find something that I wrote and it would take me a while.

Now, I use Quarto for everything.

My biggest audience is on LinkedIn, but it’s not that easy to post technical content. To my knowledge, there are three ways to do it:

  • You can write an article
  • You can create a training
  • You can post an external link

The problem of writing an article on LinkedIn is that the editor is good for text pieces but unfriendly for technical content, especially for code and source control. In addition, the editor requires the writer to edit online all the time. In practice, I mostly copied and pasted.

The problem of creating a training is that I think it’s a lot of work. I never tried, and maybe it’s easier than I think it is, but just getting started seems like a lot.

Instead of using LinkedIn, a very popular option is to use Medium or, more specifically, “Towards Data Science” (TDS), a subset of Medium articles focused on data science. I frequently find articles I like in TDS, but it’s somewhat pay-walled. You get just a few free articles for free. For authors, the advantages are that TDS is widely promoted in search results and that authors get paid. Not enough to quit a job and write for TDS, but enough to buy a couple books per year. Other options are newsletters, but it starts to feel too much like a job.

The LinkedIn algorithm seems to punish posts that only point users to an external article. I can understand that: this type of post is unlikely to generate any engagement inside of LinkedIn: people just “click out”.

In any case, the problem I wanted to solve was to be able to write more technical posts from time to time, but still be able to post those to LinkedIn automatically. To write technical posts on my blog, I started using #Quarto and loving it. Recently, I wrote some code to configure Quarto to post automatically to LinkedIn. The code scans my Quarto files and uses the LinkedIn API to post them. If they fit fully as text, it posts them as a normal post. If they’re too large, it posts the beginning of the article and a link to my blog.

Now, when I write a blog post (technical or non-technical) or even real work code, I can choose to automatically post it to LinkedIn and Twitter by simply adding some front-matter to my file.

This solves many problems for me. With that, I now do all my writing in VS Code. I don’t need to use Buffer anymore. I even have version control.

Now I just need to write interesting stuff!