Jekyll Display Medium Posts

A Gem that fetches your RSS feed, parses and saves the request to be used within your Jekyll Site.

Live Demo


Add this line to your Jekyll site's Gemfile within the :jekyll_plugins section.

group :jekyll_plugins do
  gem "jekyll-display-medium-posts"

And then execute:

$ bundle

Or install it yourself as:

$ gem install jekyll-display-medium-posts


And add the following line to your Jekyll site's _config.yml:

  - medium_posts

This is where your parsed Blog Feed will be stored. From here you're able to access it in whatever page you wish.

Lastly, you'll need to set an Environment Variable for your Medium Username. For example, if your medium profile is, your username would be jameshamann . The quickest way to set this would be to run the following command in your shell.

$ export MEDIUM_USERNAME=jameshamann

You could also set this variable in your bash profile or, if you're using dotenv, you can add this to your .env file.

For example, you could create a blog.html page with the following code.

<h2> Latest Blog Posts </h2>

{% for e in site.medium_posts %}

<div class="row">

  {% endfor %}


This will create an endless scroll of your latest blog posts.

You can test if this works by running jekyll serve and monitoring the output on your terminal. You should notice a list of your latest posts, along with their titles, like this.

→ jekyll serve
Configuration file: yourpath/_config.yml
            Source: /yourpath
       Destination: /yourpath/_site
 Incremental build: disabled. Enable with --incremental
W, [2017-12-29T14:12:28.986083 #20647]  WARN -- Feedjira: Failed to parse last modified ''
"Title: React with CircleCI, AWS S3 and AWS CloudFront, published on Medium #<Feedjira::Parser::RSSEntry:0x00007ff9a34e0300>"
"Title: Net Neutrality, published on Medium #<Feedjira::Parser::RSSEntry:0x00007ff9a42ab7c8>"
"Title: Ethereum and Blockchain Technology, published on Medium #<Feedjira::Parser::RSSEntry:0x00007ff9a3667458>"
"Title: Creating your own Jekyll Theme Gem, published on Medium #<Feedjira::Parser::RSSEntry:0x00007ff9a390ebe8>"
"Title: Cloud Computing Service Types, published on Medium #<Feedjira::Parser::RSSEntry:0x00007ff9a4c3a8e8>"
"Title: Rails 5 API, React, Bitbucket Pipelines and AWS Elastic Beanstalk — Part One, published on Medium #<Feedjira::Parser::RSSEntry:0x00007ff9a4c72d60>"
"Title: Hi Martin Raskovsky, thanks for getting in touch!, published on Medium #<Feedjira::Parser::RSSEntry:0x00007ff9a366e3c0>"
"Title: Provisioning SSL certificates on your Server, published on Medium #<Feedjira::Parser::RSSEntry:0x00007ff9a368b790>"
"Title: React-Native and Firebase — Part One Simple Authentication, published on Medium #<Feedjira::Parser::RSSEntry:0x00007ff9a3673a50>"
"Title: Setting up an Ubuntu EC2 instance, published on Medium #<Feedjira::Parser::RSSEntry:0x00007ff9a34b04c0>"
                    done in 5.193 seconds.
 Auto-regeneration: enabled for '/yourpath'
    Server address:
  Server running... press ctrl-c to stop.

Further Development

• The ability to save and view each medium post seperately. • The ability to automate updating the "Latest Blog Posts" feed.


Bug reports and pull requests are welcome on GitHub at This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.


• Add proper tests.


The gem is available as open source under the terms of the MIT License.

jekyll logo

Want a Jekyll website built?

Hire a Jekyll developer