gatsby-use-sitemetadata
v0.0.3
Published
Gatsby Use siteMetadata is the hook/tool web creators use to have your business information on the hands when you are developing some custom block.
Downloads
2
Maintainers
Readme
Gatsby Use sitemetada
GUS by Edu4Dev
Shortcut to request business data written on gatsby-config.js
siteMetadata.
🚀 Quick start
To get started to log data on your build, you can follow these steps:
- Install Gatsby Use siteMetadata gatsby-plugin with the follow command:
npm i gatsby-use-sitemetadata
🧐 What's inside?
This plugin generates the files Gatsby looks for inside node_modules.
/gatsby-use-sitemetadata
├── src/tools
├────── useSitemetaData.js
├── LICENSE(0BSD)
├── package.json
└── README.md
- Plug and Play
There's no need to configure the plugin, just plug-n-play inside your custom block:
import { useSiteMetadata } from 'gatsb-use-sitemetadata'
const MyAwesomeComponent = ({subAgent}) => {
return <p>{useSiteMetadata.message}</p>
}
export default MyAwesomeComponent
Here is the query you're requesting for:
query {
site {
siteMetadata {
title
headline
basePath
name
version
developer
coauthorBusiness
project
url
message
}
}
}
- Verify the plugin was added correctly
If the plugin aren't working Gatsby will break.
🎓 Learning Gatsby
If you're looking for more guidance on plugins, how they work, or what their role is in the Gatsby ecosystem, check out some of these resources:
- The Creating Plugins section of the docs has information on authoring and maintaining plugins yourself.
- The conceptual guide on Plugins, Themes, and Starters compares and contrasts plugins with other pieces of the Gatsby ecosystem. It can also help you decide what to choose between a plugin, starter, or theme.
- The Gatsby plugin library has over 1750 official as well as community developed plugins that can get you up and running faster and borrow ideas from.