Skip to content

Commit fe9cebb

Browse files
committed
Modified to avoid jekyll-redirect-from interference
1 parent 8b63156 commit fe9cebb

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
# jekyll-redirect-html
2-
A Jekyll layout that redirects to a new page.
2+
A Jekyll layout that redirects to a new page without using `jekyll-redirect-from` plugin.
33

44
For some Jekyll sites, setting up URL re-writes or HTTP 301 Moved Permanently response codes on HTTP web servers (such as Apache or NGINX) is not possible. If you reorganise your site, external links to your original pages will be broken, which is not a great web experience.
55

66
The redirect layout creates an HTML redirection page from the original page URL to its new location.
77

88
## Installation
99

10-
1. Copy the `_layouts/redirect.html` file to your Jekyll `_layouts` folder.
10+
1. Copy the `_layouts/redirection.html` file to your Jekyll `_layouts` folder.
1111
1. Optionally create a `_redirects` folder, adding it to the `include:` section of your `_config.yml`.
1212
1. Create a page with the front matter below. The redirect file name is not important as the original and redirect page URLs are controlled by `permalink` and `redirect` front matter settings.
1313

1414
## Redirect Page
1515
```yaml
1616
---
17-
layout: redirect
17+
layout: redirection
1818
permalink: /path/to/original/page/
1919
redirect: /path/to/correct/page/
2020
---
2121
```
2222

23+
**NB: The layout has been renamed from `redirect.html` to `redirection.html` to avoid interference with [jekyll-redirect-from](https://github.com/jekyll/jekyll-redirect-from) plugin.**
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
# Jekyll layout that redirects to another page.
3-
# Version v1.0.1
2+
# Jekyll layout that redirects to another page without using jekyll-redirect-from
3+
# Version v1.1.0
44
# https://www.jsware.io/jekyll-redirect-html
55
# © 2021 John Scott
66
# MIT License

docs/index.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
# jekyll-redirect-html
2-
A Jekyll layout that redirects to a new page.
2+
A Jekyll layout that redirects to a new page without using `jekyll-redirect-from` plugin.
33

44
For some Jekyll sites, setting up URL re-writes or HTTP 301 Moved Permanently response codes on HTTP web servers (such as Apache or NGINX) is not possible. If you reorganise your site, external links to your original pages will be broken, which is not a great web experience.
55

66
The redirect layout creates an HTML redirection page from the original page URL to its new location.
77

88
## Installation
99

10-
1. Copy the `_layouts/redirect.html` file to your Jekyll `_layouts` folder.
10+
1. Copy the `_layouts/redirection.html` file to your Jekyll `_layouts` folder.
1111
1. Optionally create a `_redirects` folder, adding it to the `include:` section of your `_config.yml`.
1212
1. Create a page with the front matter below. The redirect file name is not important as the original and redirect page URLs are controlled by `permalink` and `redirect` front matter settings.
1313

1414
## Redirect Page
1515
```yaml
1616
---
17-
layout: redirect
17+
layout: redirection
1818
permalink: /path/to/original/page/
1919
redirect: /path/to/correct/page/
2020
---
2121
```
22+
23+
**NB: The layout has been renamed from `redirect.html` to `redirection.html` to avoid interference with [jekyll-redirect-from](https://github.com/jekyll/jekyll-redirect-from) plugin.**

0 commit comments

Comments
 (0)