Skip to content

Commit

Permalink
docs: update MediumPost docs (#545)
Browse files Browse the repository at this point in the history
* docs: update MediumPost docs

* fix: remove extra option definition
  • Loading branch information
vpicone authored Nov 19, 2019
1 parent beea3a0 commit 17ee8c9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
15 changes: 15 additions & 0 deletions packages/example/src/pages/components/MediumPosts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@ Using a Gatsby plugin, this component automatically builds three `ArticleCards`

</PageDescription>

## Setup

To update the source account for this component, pass in a `mediumAccount` to your theme options in `gatsby-config.js`.

```js
plugins: [
{
resolve: 'gatsby-theme-carbon',
options: {
mediumAccount: 'carbondesign',
},
},
];
```

## Example

<MediumPosts color="dark" posts={3} />
Expand Down
9 changes: 4 additions & 5 deletions packages/example/src/pages/guides/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,14 @@ To add a link to the bottom of each page that points to the current page source

## Medium

Automatically grab posts from Medium's RSS feed and populate `ArticleCards`. Enable `gatsby-source-medium-feed` by shadowing this plugin and providing a `userName`. For guidance on how to use this plugin checkout [MediumPosts](/components/MediumPosts).
In order to change the source account for the [`MediumPosts`](/components/MediumPosts) component, provide an account with the `mediumAccount` option.

```js
plugins: [
{
resolve: 'gatsby-source-medium-feed',
resolve: 'gatsby-theme-carbon',
options: {
userName: '@...', // Medium user name or publication
name: 'MediumFeed', // GraphQL query AllMediumFeed
mediumAccount: 'carbondesign',
},
},
];
Expand All @@ -174,7 +173,7 @@ plugins: [
## Other options

- `additionalFontWeights` – add support for additional Plex font weights. Don't forget to specify italics for the additional weights if needed.
- `mdxExtensions` – change the file extensions processed by `gatsby-mdx` (default ['.mdx', '.md'])
- `mdxExtensions` – change the file extensions processed by `gatsby-mdx` (default ['.mdx', '.md']).
- `titleType` – pick between four formats for the `<title>` element for your site. Here are the four options using this page as an example:
- `page`: "Configuration" (default)
Expand Down

1 comment on commit 17ee8c9

@vercel
Copy link

@vercel vercel bot commented on 17ee8c9 Nov 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.