Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cometkim/gatsby-plugin-pagemeta
A GatsbyJS plugin to use comments as page metadata.
https://github.com/cometkim/gatsby-plugin-pagemeta
gatsby gatsby-plugin
Last synced: 3 days ago
JSON representation
A GatsbyJS plugin to use comments as page metadata.
- Host: GitHub
- URL: https://github.com/cometkim/gatsby-plugin-pagemeta
- Owner: cometkim
- Created: 2020-08-11T12:43:44.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T17:59:12.000Z (about 1 year ago)
- Last Synced: 2024-10-29T14:46:08.275Z (3 months ago)
- Topics: gatsby, gatsby-plugin
- Language: TypeScript
- Homepage:
- Size: 79.9 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-list - gatsby-plugin-pagemeta
README
# gatsby-plugin-pagemeta
A GatsbyJS plugin to use comments as page metadata.
## Usage
```bash
yarn add gatsby-plugin-pagemeta
```Add plugin to the `gatsby-config.js`
```js
plugins: ['gatsby-plugin-pagemeta']
```See [types](./src/types.ts) for more detail.
## Example
```tsx
// in pages/my-page.js// @pageMeta:title My Page
// @pageMeta:description An example pageconst MyPage: React.FC = () => {
// ...
};export default MyPage;
```This plugin extracts the metadata from comments, so you can query them from otherside like
```graphql
query Navigation {
allSitePage {
nodes {
path
context {
pageMeta {
title
description
}
}
}
}
}
```## License
MIT