Cross post to dev.to from Webflow or Google Docs - How to handle formatting?

Hey folks!

I have a developer blog and I really would like to share my work with the dev.to community (and maybe with the Medium community too) because I think I can solve a problem with my posts here and there…

However, after quite some research, I’m kind of stuck with how to painlessly cross post my articles to dev.to.

I host my developer blog on webflow and write my stuff in Google Docs.

Things I’ve tried and/or thought of:

RSS importer

The RSS importer does not work properly (just article snippets and formatting wrong).

Copy Pasta

From the Gdocs and the webflow editors I can flawlessly copy-paste to Medium(:tea:). But on dev.to the RTF stuff is kindly ignored, which leaves me with an unbearable task of editing the format, the links, the pictures…

Post a short summary of the post with the link

:unamused:

Highly Automated Pipeline

  1. Write everything in markdown in VSCode checked by the VSCode Grammarly plugin.
  2. Push to GitHub
  3. GitHub action picks it up and sends it to Webflow/dev.to API (I wouldn’t be able to post to Medium then without problems, but I can actually live without Medium TBH)

However, there are many wonderous questions:

  • How well will the platforms handle the markdown body?
  • How to handle the pain of having to pre-upload all pictures?
  • How do I handle updating the posts? (different GitHub actions with different requests?)
  • etc etc

Scraping

I mean, the HTML is up there: fullstack.coach

Maybe then…

  1. Scrape it
  2. Push it through a markdown parser
  3. Send it to dev.to

(but again all the questions from the previous section… and probably even more…)

Before I throw myself into highly automated pipelines or scraping , which both sound like fun and time consumption:

Am I overthinking or is there maybe a better path that I am missing?

1 Like

Very interesting!

I only looked at WF’s API, you can push the contents of the post as html with links and styling etc as the post_body. So you’d need to generate html from the .md. Images will only work as pre-uploaded links, from which it will grab it and save it to the cdn. Unfortunately no base64 or any encoding for that matter!
It should be possible to grab the link from github though, after you include them in the commit - even with rel paths if its the same directory…
It would be easier if the repo is public though :slight_smile:

1 Like

Hey man, thank you very much for putting thought into it and looking at the API!

It’s true that you can just put the HTML into a post-body (or plain text, which will look fabolous :grin:). You probably could also create a markdown-body like here and then make the POST request POST /collections/:collection_id/items

I’m not sure what you mean by ‘grab the link’ exactly. I thought to run a GitHub webhook whenever I push a post to GitHub. From there I’d need to forward the content with the API call to webflow.

I think such an integration could be generally interesting for developers who use webflow, so I’m very enticed to start working on it :grin:

I’ve built a little commandline tool for that.

Check it out, if you’d like to host your markdown on webflow:

Full documentation over at my blog:
https://fullstack.coach/post/how-to-write-and-cross-post-your-markdown-content