Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bradgarropy/gatsby-plugin-seo
🔎 gatsby-plugin-seo
https://github.com/bradgarropy/gatsby-plugin-seo
facebook gatsby gatsby-plugin hacktoberfest meta open-graph seo twitter
Last synced: 3 days ago
JSON representation
🔎 gatsby-plugin-seo
- Host: GitHub
- URL: https://github.com/bradgarropy/gatsby-plugin-seo
- Owner: bradgarropy
- License: mit
- Created: 2020-05-23T00:15:55.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T09:56:01.000Z (almost 2 years ago)
- Last Synced: 2024-12-17T02:36:24.906Z (8 days ago)
- Topics: facebook, gatsby, gatsby-plugin, hacktoberfest, meta, open-graph, seo, twitter
- Language: CSS
- Homepage: https://npmjs.com/package/@bradgarropy/gatsby-plugin-seo
- Size: 2.87 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 25
-
Metadata Files:
- Readme: readme.md
- Contributing: contributing.md
- License: license
Awesome Lists containing this project
README
# 🔎 gatsby-plugin-seo
[![version][version-badge]][npm]
[![downloads][downloads-badge]][npm]
[![size][size-badge]][bundlephobia]
[![github actions][github-actions-badge]][github-actions]
[![coverage][codecov-badge]][codecov]
[![typescript][typescript-badge]][typescript]
[![contributing][contributing-badge]][contributing]
[![contributors][contributors-badge]][contributors]
[![discord][discord-badge]][discord]_SEO plugin for [Gastby][gatsby]. Supports [Facebook][facebook], [Twitter][twitter], [Open Graph][og], and `meta` tags._
## 📦 Installation
This package is installable from [npm][npm].
```shell
npm install @bradgarropy/gatsby-plugin-seo
```## 🥑 Usage
To add a base set of SEO tags, create a [custom `` component][layout] and add the `` component there. The SEO tags will render for every route in your site.
```jsx
// .src/components/Layout.jsimport SEO from "@bradgarropy/next-seo"
const Layout = ({children}) => {
return (
<>
{children}
>
)
}export default Layout
```If you want to override SEO tags on individual pages, use the `` component and only include the props that you want to update. For example, if you added `` in the `Layout.js` file as shown above, and then included `` in the `about.js` file as shown below, the `description` would be overwritten to be `Learn more about me`.
```jsx
// .src/pages/about.jsimport SEO from "@bradgarropy/next-seo"
import Layout from "../components/layout"const AboutPage = () => {
return (
about
)
}export default AboutPage
```With this capability, you can create a default set of SEO tags, and then tailor certain properties on specific pages.
## 📖 API Reference
### ``
| Name | Required | Example | Description |
| :--------------- | :------: | :--------------------------------- | :--------------------------------------------------------- |
| `title` | `false` | `"My website"` | Page title. |
| `description` | `false` | `"A blog and portfolio"` | Description of the page. |
| `keywords` | `false` | `["website", "blog", "portfolio"]` | Array of keywords. |
| `icon` | `false` | `"/favicon.ico"` | Tab icon url. |
| `themeColor` | `false` | `"#000000"` | Browser theme color. |
| `colorScheme` | `false` | `"light"` | Preferred color scheme. |
| `facebook.image` | `false` | `"/facebook.png"` | Facebook share image. |
| `facebook.url` | `false` | `"https://website.com"` | Page URL. |
| `facebook.type` | `false` | `"website"` | Type of resource. See all types [here][types]. |
| `twitter.image` | `false` | `"/twitter.png"` | Twitter share image. |
| `twitter.site` | `false` | `"@bradgarropy"` | Twitter handle of publishing site. |
| `twitter.card` | `false` | `"summary"` | Format of Twitter share card. See all types [here][cards]. |All of the `SEO` props are optional. If a prop is not provided, the associated meta tag will not be rendered.
```jsx
// renders no seo tags// renders all seo tags
// renders some seo tags
```
## ❔ Questions
🐛 report bugs by filing [issues][issues]
📢 provide feedback with [issues][issues] or on [twitter][twitter]
🙋🏼♂️ use my [ama][ama] or [twitter][twitter] to ask any other questions## ✨ contributors
Brad Garropy
💻 📖 ⚠️ 🚇
Gem Kosan
💻
[gatsby]: https://gatsbyjs.org
[facebook]: https://www.facebook.com/profile.php?id=7933107
[twitter]: https://twitter.com/bradgarropy
[og]: https://ogp.me
[npm]: https://www.npmjs.com/package/@bradgarropy/gatsby-plugin-seo
[issues]: https://github.com/bradgarropy/gatsby-plugin-seo/issues
[twitter]: https://twitter.com/bradgarropy
[ama]: https://bradgarropy.com/ama
[version-badge]: https://img.shields.io/npm/v/@bradgarropy/http.svg?style=flat-square
[downloads-badge]: https://img.shields.io/npm/dt/@bradgarropy/http?style=flat-square
[bundlephobia]: https://bundlephobia.com/result?p=@bradgarropy/gatsby-plugin-seo
[size-badge]: https://img.shields.io/bundlephobia/minzip/@bradgarropy/http?style=flat-square
[github-actions]: https://github.com/bradgarropy/gatsby-plugin-seo/actions
[github-actions-badge]: https://img.shields.io/github/workflow/status/bradgarropy/gatsby-plugin-seo/%F0%9F%9A%80%20release?style=flat-square
[codecov]: https://app.codecov.io/gh/bradgarropy/gatsby-plugin-seo
[codecov-badge]: https://img.shields.io/codecov/c/github/bradgarropy/gatsby-plugin-seo?style=flat-square
[typescript]: https://www.typescriptlang.org/dt/search?search=%40bradgarropy%2Fgatsby-plugin-seo
[typescript-badge]: https://img.shields.io/npm/types/@bradgarropy/gatsby-plugin-seo?style=flat-square
[contributing]: https://github.com/bradgarropy/gatsby-plugin-seo/blob/master/contributing.md
[contributing-badge]: https://img.shields.io/badge/PRs-welcome-success?style=flat-square
[contributors]: #-contributors
[contributors-badge]: https://img.shields.io/github/all-contributors/bradgarropy/gatsby-plugin-seo?style=flat-square
[discord]: https://bradgarropy.com/discord
[discord-badge]: https://img.shields.io/discord/748196643140010015?style=flat-square
[layout]: https://www.gatsbyjs.com/docs/recipes/pages-layouts#creating-a-layout-component