mirror of
https://github.com/kremalicious/gatsby-redirect-from.git
synced 2024-12-22 09:13:20 +01:00
docs updates
This commit is contained in:
parent
265be4ce05
commit
65c4587091
@ -1,10 +0,0 @@
|
|||||||
|
|
||||||
# EditorConfig is awesome: http://EditorConfig.org
|
|
||||||
|
|
||||||
[*]
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
end_of_line = lf
|
|
||||||
insert_final_newline = true
|
|
||||||
charset = utf-8
|
|
||||||
trim_trailing_whitespace = true
|
|
13
README.md
13
README.md
@ -1,3 +1,5 @@
|
|||||||
|
[![gatsby-redirect-from](https://raw.githubusercontent.com/kremalicious/gatsby-redirect-from/master/src/gatsby-redirect-from.png)](https://kremalicious.com/gatsby-redirect-from/)
|
||||||
|
|
||||||
# gatsby-redirect-from
|
# gatsby-redirect-from
|
||||||
|
|
||||||
[![npm package](https://img.shields.io/npm/v/gatsby-redirect-from.svg)](https://www.npmjs.com/package/gatsby-redirect-from)
|
[![npm package](https://img.shields.io/npm/v/gatsby-redirect-from.svg)](https://www.npmjs.com/package/gatsby-redirect-from)
|
||||||
@ -6,6 +8,7 @@
|
|||||||
[![Dependabot enabled](https://badgen.net/dependabot/thepracticaldev/dev.to?icon=dependabot)](https://dependabot.com/)
|
[![Dependabot enabled](https://badgen.net/dependabot/thepracticaldev/dev.to?icon=dependabot)](https://dependabot.com/)
|
||||||
|
|
||||||
> 🎯 Set redirect urls in your YAML frontmatter within your [Gatsby](https://www.gatsbyjs.org) site's Markdown files. Mimics the behavior of [jekyll-redirect-from](https://github.com/jekyll/jekyll-redirect-from).
|
> 🎯 Set redirect urls in your YAML frontmatter within your [Gatsby](https://www.gatsbyjs.org) site's Markdown files. Mimics the behavior of [jekyll-redirect-from](https://github.com/jekyll/jekyll-redirect-from).
|
||||||
|
> https://kremalicious.com/gatsby-redirect-from/
|
||||||
|
|
||||||
By adding a list of urls to the YAML frontmatter, this plugin creates redirects for all of them at build time. It uses Gatsby's [createRedirect](https://www.gatsbyjs.org/docs/actions/#createRedirect) under the hood.
|
By adding a list of urls to the YAML frontmatter, this plugin creates redirects for all of them at build time. It uses Gatsby's [createRedirect](https://www.gatsbyjs.org/docs/actions/#createRedirect) under the hood.
|
||||||
|
|
||||||
@ -13,10 +16,11 @@ By adding a list of urls to the YAML frontmatter, this plugin creates redirects
|
|||||||
|
|
||||||
- [Prerequisites](#prerequisites)
|
- [Prerequisites](#prerequisites)
|
||||||
- [Installation](#installation)
|
- [Installation](#installation)
|
||||||
- [Server Rendering](#server-rendering)
|
- [Server-Side Redirects](#server-side-redirects)
|
||||||
- [Usage](#usage)
|
- [Usage](#usage)
|
||||||
- [Options](#options)
|
- [Options](#options)
|
||||||
- [Plugin Development](#plugin-development)
|
- [Plugin Development](#plugin-development)
|
||||||
|
- [Changelog](#changelog)
|
||||||
- [License](#license)
|
- [License](#license)
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -49,7 +53,7 @@ plugins: [
|
|||||||
|
|
||||||
That's it. See [Usage](#usage).
|
That's it. See [Usage](#usage).
|
||||||
|
|
||||||
### Server Rendering
|
### Server-Side Redirects
|
||||||
|
|
||||||
Gatsby's `createRedirect` only creates client-side redirects, so further integration is needed to get server redirects too. Which is highly dependent on your hosting, if you want to have the proper HTML status codes like `301`, Apache needs `.htaccess` rules for that, nginx `rewrite` rules, S3 `RoutingRules` and so on.
|
Gatsby's `createRedirect` only creates client-side redirects, so further integration is needed to get server redirects too. Which is highly dependent on your hosting, if you want to have the proper HTML status codes like `301`, Apache needs `.htaccess` rules for that, nginx `rewrite` rules, S3 `RoutingRules` and so on.
|
||||||
|
|
||||||
@ -71,6 +75,7 @@ redirect_from:
|
|||||||
- /2008/04/aperture-file-types/
|
- /2008/04/aperture-file-types/
|
||||||
# note: forward slashes are required
|
# note: forward slashes are required
|
||||||
---
|
---
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
@ -111,6 +116,10 @@ npm run release minor
|
|||||||
npm run release major
|
npm run release major
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
|
||||||
|
See [CHANGELOG.md](CHANGELOG.md).
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
The MIT License
|
The MIT License
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"version": "0.2.2",
|
"version": "0.2.2",
|
||||||
"author": "Matthias Kretschmann <m@kretschmann.io>",
|
"author": "Matthias Kretschmann <m@kretschmann.io>",
|
||||||
"description": "Set redirect urls in your YAML frontmatter within your Gatsby site's Markdown files. Mimics the behavior of jekyll-redirect-from.",
|
"description": "Set redirect urls in your YAML frontmatter within your Gatsby site's Markdown files. Mimics the behavior of jekyll-redirect-from.",
|
||||||
"homepage": "https://github.com/kremalicious/gatsby-redirect-from",
|
"homepage": "https://kremalicious.com/gatsby-redirect-from/",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
BIN
src/gatsby-redirect-from.png
Normal file
BIN
src/gatsby-redirect-from.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
Loading…
Reference in New Issue
Block a user