Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cloudogu/gatsby-transformer-keepachangelog
Gatsby transformer plugin for files in the keepachangelog format
https://github.com/cloudogu/gatsby-transformer-keepachangelog
changelog gatsby gatsby-plugin gatsbyjs keepachangelog markdown
Last synced: 3 months ago
JSON representation
Gatsby transformer plugin for files in the keepachangelog format
- Host: GitHub
- URL: https://github.com/cloudogu/gatsby-transformer-keepachangelog
- Owner: cloudogu
- Created: 2020-05-06T10:42:21.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-07T04:41:15.000Z (about 2 years ago)
- Last Synced: 2024-09-26T00:28:33.505Z (4 months ago)
- Topics: changelog, gatsby, gatsby-plugin, gatsbyjs, keepachangelog, markdown
- Language: JavaScript
- Size: 957 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gatsby-transformer-keepachangelog
Parses files which are written in the [keepachangelog](http://keepachangelog.com/en/1.0.0/) format.
Every file with the name CHANGELOG.md is picked up by the transformer.
## Install
`npm install --save gatsby-transformer-keepachangelog`
**Note:** You also need to have `gatsby-source-filesystem` installed and configured so it points to your files.
## How to use
In your `gatsby-config.js`
```javascript
module.exports = {
plugins: [
`gatsby-transformer-keepachangelog`,
{
resolve: `gatsby-source-filesystem`,
options: {
path: `./src/data/`,
},
},
],
}
```Where the _source folder_ `./src/data/` contains the `CHANGELOG.md` files.
## How to query
You can query the nodes using GraphQL, like from the GraphiQL browser: `http://localhost:8000/___graphql`.
```graphql
{
allChangelog {
nodes {
versions {
tag
date
changes {
html
}
}
}
}
}
```Which would return:
```json
{
"data": {
"allChangelog": {
"nodes": [
{
"versions": [
{
"tag": "1.0.0",
"date": "2020-04-09T00:00:00.000Z",
"changes": {
"html": "Fixed
..."
}
},
{
"tag": "1.0.0-RC1",
"date": "2020-03-26T00:00:00.000Z",
"changes": {
"html": "Added
..."
}
}
]
}
]
}
}
}
```