3 Ways of Adding Medium Stories to your Gatsby Site

How to automatically fetch your Medium Posts to your website

Marcos Lombog
Geek Culture

--

Introduction

Have you ever wanted to show great Medium content in your own website? In this post, I will show three ways of fetching Medium articles, and adding them to your Gatsby Website. When publishing new content to Medium, it will automatically be reflected in your website.

Medium has its own publicly available API, by which we can write to Medium from anywhere. But unfortunately, it doesn’t provide any easy way to get the list of your written articles and show it on your websites.

Fortunately, Gatsby offers great plugins to help you with that. This article will show how to fetch our medium articles, and display them on our website.

In the first option, I will use the Gatsby official Medium plugin, explaining the limitations. Then, I will show a more flexible option of bringing the content using the RSS feed available in Medium. The third option is using direct JavaScript without the use of plugins.

All source code is available with a link to my GitHub at the end of the article. Happy coding.

Let’s Start

--

--