Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kai-oswald/gridsome-source-buttondown
Buttondown source for Gridsome
https://github.com/kai-oswald/gridsome-source-buttondown
gridsome gridsome-plugin gridsome-source
Last synced: 11 days ago
JSON representation
Buttondown source for Gridsome
- Host: GitHub
- URL: https://github.com/kai-oswald/gridsome-source-buttondown
- Owner: kai-oswald
- Created: 2019-11-22T09:38:23.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-22T10:52:45.000Z (about 5 years ago)
- Last Synced: 2024-10-25T19:49:35.392Z (about 2 months ago)
- Topics: gridsome, gridsome-plugin, gridsome-source
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gridsome-source-buttondown
> [Buttondown](https://buttondown.email) source for Gridsome
## Install
- `yarn add gridsome-source-buttondown`
- `npm install gridsome-source-buttondown`## Usage
```js
const { API_KEY } = process.env;
module.exports = {
plugins: [
{
use: 'gridsome-source-buttondown',
options: {
apiKey: API_KEY
}
}
],
templates: {
Email: "/archive/:id"
}
}
```This plugin lets you load data from the Buttondown API. This allows you to directly host your own archive within Gridsome.
You can then query the collection. All field names the Buttondown API provides are available. [View Reference](https://api.buttondown.email/v1/schema#operation/emails_list)
```html
{
allEmail {
edges {
node {
id,
publish_date,
email_type,
subject,
body,
path
}
}
}
}```
## Options
#### apiKey
- Type: `string` *required*
The buttondown API Key (found in [settings](https://buttondown.email/settings)).
#### typeName
- Type: `string`
- Default: `'Email'`The GraphQL type and template name. A `.vue` file in `src/templates` must match the `typeName` to have a template for it.