Skip to content
This repository has been archived by the owner on Oct 27, 2021. It is now read-only.

Commit

Permalink
Merge pull request #78 from spences10/develop
Browse files Browse the repository at this point in the history
Move to TypeScript
  • Loading branch information
spences10 authored Apr 11, 2020
2 parents 32acf12 + 6353285 commit 5cec979
Show file tree
Hide file tree
Showing 15 changed files with 4,718 additions and 769 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

13 changes: 4 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Project dependencies
.cache
node_modules

# Build directory
public

# Other
*.log
.DS_Store
yarn-error.log
node_modules
.cache
dist
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
61 changes: 44 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
# A `react-seo-component`

[![CodeFactor](https://www.codefactor.io/repository/github/spences10/react-seo-component/badge)](https://www.codefactor.io/repository/github/spences10/react-seo-component) ![bundlephobia min](https://badgen.net/bundlephobia/min/react-seo-component) ![bundlephobia minzip](https://badgen.net/bundlephobia/minzip/react)
[![CodeFactor](https://www.codefactor.io/repository/github/spences10/react-seo-component/badge)](https://www.codefactor.io/repository/github/spences10/react-seo-component)
![bundlephobia min](https://badgen.net/bundlephobia/min/react-seo-component)
![bundlephobia minzip](https://badgen.net/bundlephobia/minzip/react)

Use it for adding canonical links, metadata and OpenGraph information
to your react projects!
to your React projects!

## Use it!

Install it from npm!

```bash
yarn add react-seo-component
# peer dependency of react helmet
yarn add react-helmet
```

If you are using it with Gatsby you will need to install
`gatsby-plugin-react-helmet` to have the meta tags generated at build
time.
If you are using it with Gatsby you will also need to install the
Gatsby plugin:

```bash
yarn add react-seo-component
yarn add react-helmet
yarn add gatsby-plugin-react-helmet
# or in one command
yarn add react-seo-component react-helmet gatsby-plugin-react-helmet
```

This will create the meta tags at build time.

**Examples:**

Expand Down Expand Up @@ -53,14 +66,6 @@ For a blog post:
/>
```

## Dependencies

Presumes you already have the following installed:

- `prop-types`
- `react`
- `react-helmet`

## Props

| Prop | Type | Default |
Expand All @@ -78,10 +83,28 @@ Presumes you already have the following installed:
| datePublished | ISO date string | `Date.now()` |
| dateModified | ISO date string | `Date.now()` |

## Thanks
## To test locally

Use `npm pack` or `yarn pack` to create a `.tgz` of the project you
can install locally on your project to test with.

```bash
# from here
yarn pack
# copy to project to test
cp react-seo-component-2.0.1.tgz ../project-to-test-with/
# ~/project-to-test-with
yarn add file:react-seo-component-2.0.1.tgz
```

## Thanks:

- **[LekoArts]** for the initial components detailed in his Gatsby
[Prismic starter].

- **[Leigh Halliday]** for the [primer video] on using [TSDX]

Thanks to [@LekoArts] for the initial components detailed in his
Gatsby [Prismic starter].
- **[Jared Palmer]** for [TSDX]

## Resources

Expand All @@ -91,5 +114,9 @@ https://github.com/recraftrelic/dummy-react-npm-module/blob/master/package.json

<!-- Links -->

[@lekoarts]: https://github.com/LekoArts
[lekoarts]: https://github.com/LekoArts
[prismic starter]: https://github.com/LekoArts/gatsby-starter-prismic
[jared palmer]: https://github.com/jaredpalmer
[leigh halliday]: https://github.com/leighhalliday
[tsdx]: https://github.com/jaredpalmer/tsdx
[primer video]: https://www.youtube.com/watch?v=V3XZYC8zmvo
266 changes: 0 additions & 266 deletions index.js

This file was deleted.

Loading

0 comments on commit 5cec979

Please sign in to comment.