Skip to content

Commit b000f27

Browse files
committed
version 1.7
1 parent dbb3508 commit b000f27

File tree

5 files changed

+2
-15
lines changed

5 files changed

+2
-15
lines changed

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ destination: /to-this-location/
5353

5454
Set `canonical` to `true` to indicate the destination is the canonical URL for this redirect.
5555

56-
**`external`** _(optional. defaults to false)_
57-
58-
Set `external` to `true` if this redirect points to another domain.
59-
6056
When using a sitemap generator, it is common to exclude all redirects from the sitemap. Usually this is done by adding `sitemap: false` as a front-matter variable.
6157

6258
## Examples
@@ -70,7 +66,6 @@ An example internal canonical redirect:
7066
permalink: /redirect-this-url/
7167
destination: /to-this-location/
7268
canonical: true
73-
external: false
7469
---
7570
```
7671

@@ -81,7 +76,6 @@ An example external redirect:
8176
permalink: /leaving/
8277
destination: http://example.com/arriving
8378
canonical: false
84-
external: true
8579
---
8680
```
8781

_layouts/redirect.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
---
22
# Jekyll layout to create URL redirects
33
# https://github.com/jekylltools/jekyll-redirect-layout
4-
# v1.6
4+
# v1.7
55
---
6-
{%- if page.external == true -%}
7-
{%- assign destination = page.destination -%}
8-
{%- else -%}
9-
{%- assign destination = page.destination | absolute_url -%}
10-
{%- endif -%}
6+
{%- assign destination = page.destination | absolute_url -%}
117
<!doctype html>
128
<html>
139
<head>

_redirects/external.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
permalink: /leaving/
33
destination: http://example.com/arriving
44
canonical: false
5-
external: true
65
---

_redirects/feed.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
permalink: /feed/
33
destination: /feed.xml
44
canonical: true
5-
external: false
65
---

_redirects/page1.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
permalink: /page1/
33
destination: ''
44
canonical: false
5-
external: false
65
---

0 commit comments

Comments
 (0)