Skip to main contentGatsby theme Carbon

MediumPosts

Using a Gatsby plugin, this component automatically builds three

ArticleCards
populated with the most recent Medium posts at build time.

Setup

To update the source account for this component, pass a

mediumAccount
or an array of Medium accounts (for multiple accounts) in your theme options within
gatsby-config.js
.

plugins: [
{
resolve: 'gatsby-theme-carbon',
options: {
mediumAccount: 'carbondesign',
},
},
];
Multiple Medium Accounts
plugins: [
{
resolve: 'gatsby-theme-carbon',
options: {
mediumAccount: ['carbondesign', 'design-ibm'],
},
},
];

Example

Code

<MediumPosts color="dark" postLimit={3} />

Props

propertypropTyperequireddefaultdescription
colorstring
light
Sets the card for the correct color theme, default is
light
, options are
light
and
dark
postLimitnumber
3
Sets the number of posts pulled from Medium, default is
3
, maximum is
10
.