-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow frontpage news links to redirect to arbitrary locations (#66)
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
- Loading branch information
1 parent
ca99c77
commit 71e8b60
Showing
2 changed files
with
6 additions
and
2 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
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,6 +1,7 @@ | ||
{{ range first 1 (where .Site.RegularPages "Section" "news") }} | ||
{{ $newsLink := default "/news" .Params.newsLink }} | ||
<div class="news-container"> | ||
<div class="news-title"><a href="{{ relURL "/news" }}"> {{ .Title }}</a></div> | ||
<div class="news-date"><a href="{{ relURL "/news" }}">{{ .Date.Format "2006-01-02" }}</a></div> | ||
<div class="news-title"><a href="{{ relURL $newsLink }}"> {{ .Title }}</a></div> | ||
<div class="news-date"><a href="{{ relURL $newsLink }}">{{ .Date.Format "2006-01-02" }}</a></div> | ||
</div> | ||
{{ end }} |