1
0
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:
Matthias Kretschmann 2020-05-22 17:05:21 +02:00
parent 265be4ce05
commit 65c4587091
Signed by: m
GPG Key ID: 606EEEF3C479A91F
4 changed files with 12 additions and 13 deletions

View File

@ -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

View File

@ -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
[![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/)
> 🎯 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.
@ -13,10 +16,11 @@ By adding a list of urls to the YAML frontmatter, this plugin creates redirects
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Server Rendering](#server-rendering)
- [Server-Side Redirects](#server-side-redirects)
- [Usage](#usage)
- [Options](#options)
- [Plugin Development](#plugin-development)
- [Changelog](#changelog)
- [License](#license)
---
@ -49,7 +53,7 @@ plugins: [
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.
@ -71,6 +75,7 @@ redirect_from:
- /2008/04/aperture-file-types/
# note: forward slashes are required
---
```
## Options
@ -111,6 +116,10 @@ npm run release minor
npm run release major
```
## Changelog
See [CHANGELOG.md](CHANGELOG.md).
## License
The MIT License

View File

@ -3,7 +3,7 @@
"version": "0.2.2",
"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.",
"homepage": "https://github.com/kremalicious/gatsby-redirect-from",
"homepage": "https://kremalicious.com/gatsby-redirect-from/",
"license": "MIT",
"main": "index.js",
"scripts": {

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB