-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bring back /private and turn it into a redirect
- Streamline/cleanup some article redirecting code
- Loading branch information
1 parent
7bc04f7
commit db07f0d
Showing
3 changed files
with
18 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: Private Articles | ||
permalink: /private/ | ||
layout: article | ||
icon: lock | ||
redirect_to: https://lg-public.pages.production.gitlab.login.gov/identity-internal-handbook/ | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
{% comment %} | ||
Includes: | ||
- article: page to link to (or directly to its .redirect_to) | ||
{% endcomment %} | ||
{%- if include.article.redirect_to -%} | ||
{%- if include.redirect_to contains '://' -%} | ||
{{ article.redirect_to }} | ||
{%- if include.article.redirect_to contains '://' -%} | ||
{{ include.article.redirect_to }} | ||
{%- else -%} | ||
{{ article.redirect_to | prepend: site.baseurl }} | ||
{{ include.article.redirect_to | prepend: site.baseurl }} | ||
{%- endif -%} | ||
{%- else -%} | ||
{{ article.url | prepend: site.baseurl }} | ||
{{ include.article.url | prepend: site.baseurl }} | ||
{%- endif -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters