Skip to content

Commit

Permalink
Fixup a couple Hugo warnings. (#2104)
Browse files Browse the repository at this point in the history
* Fix .URL -> .Permalink warning
 * Fix .Dir -> .File.Dir warning

The .File.Dir zero object warning remains, I've been unable to figure
out how to fix it. It's currently triggered in each of the 3 places we
use .File.Dir.

Issue #2052
  • Loading branch information
dan sinclair authored Apr 1, 2021
1 parent 225a047 commit b87b42d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
18 changes: 9 additions & 9 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<p>{{ i18n "how-we-work" }}</p>
</div>
<div class='col-xs-12 col-md-4 title-align'>
<a href="{{ with $.Site.GetPage "partnerships" }}{{.URL}}{{ end }}#partnership-products" class='title-link'>
<a href="{{ with $.Site.GetPage "partnerships" }}{{.Permalink}}{{ end }}#partnership-products" class='title-link'>
{{ i18n "more-posts" }} <i class='fas fa-arrow-circle-right'></i>
</a>
</div>
Expand Down Expand Up @@ -42,7 +42,7 @@ <h2>{{ i18n "great-team" }} ...</h2>
<p>{{ i18n "say-hello" }}</p>
</div>
<div class="col-md-4 col-xs-12 btn">
<a href="{{ with $.Site.GetPage "meet-the-team" }}{{.URL}}{{ end }}">
<a href="{{ with $.Site.GetPage "meet-the-team" }}{{.Permalink}}{{ end }}">
{{ i18n "meet-the-team" }}
<i class='fas fa-arrow-circle-right'></i>
</a>
Expand All @@ -63,7 +63,7 @@ <h2>... {{ i18n "but-need-help" }}</h2>
<p>{{ i18n "product-impact" }}</p>
</div>
<div class="col-md-4 col-xs-12 btn">
<a href="{{ with $.Site.GetPage "join-our-team" }}{{.URL}}{{ end }}"
<a href="{{ with $.Site.GetPage "join-our-team" }}{{.Permalink}}{{ end }}"
class='apply-now'>{{ i18n "apply-now" }}
<i class='fas fa-arrow-circle-right'></i>
</a>
Expand All @@ -79,7 +79,7 @@ <h2>... {{ i18n "but-need-help" }}</h2>
<h2>{{i18n "featured-post" }}</h2>
</div>
<div class="read-blogs">
<a href="{{ with $.Site.GetPage "blog" }}{{.URL}}{{ end }}"
<a href="{{ with $.Site.GetPage "blog" }}{{.Permalink}}{{ end }}"
class='title-link'>
{{i18n "read-all-blogs" }}
</a>
Expand All @@ -96,12 +96,12 @@ <h2>{{i18n "featured-post" }}</h2>
<div class="text">
<h3>{{ .Params.title }}</h3>
<div class="date">
{{ if eq .Lang "en" }}
{{ if eq .Lang "en" }}
{{ .Date.Format "Jan 2, 2006" }}
{{ end }}
{{ if eq .Lang "fr" }}
{{ .Date.Day }} {{ index $.Site.Data.mois (printf "%d" .Date.Month) }} {{ .Date.Year }}
{{ end }}
{{ end }}
{{ if eq .Lang "fr" }}
{{ .Date.Day }} {{ index $.Site.Data.mois (printf "%d" .Date.Month) }} {{ .Date.Year }}
{{ end }}
</div>
</div>
<a href="{{ .RelPermalink }}">
Expand Down
4 changes: 2 additions & 2 deletions layouts/section/partnerships.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ <h2>{{ i18n "what-were-working-on" }}</h2>
{{ if eq $.Site.Language.Lang "fr" }}
{{ $blog_url = "choisir-nos-projets" }}
{{ end }}
<a href="{{with $.Site.GetPage $blog_url}}{{.URL}}{{ end }}">
<a href="{{with $.Site.GetPage $blog_url}}{{.Permalink}}{{ end }}">
{{ i18n "blog-post" }}.
</a>
</p>
Expand All @@ -83,7 +83,7 @@ <h2>{{ i18n "what-were-working-on" }}</h2>
</div>

<!-- In-flight partnerships -->
{{ $products := where .Site.Pages ".Dir" "==" "products/products/" }}
{{ $products := where .Site.Pages ".File.Dir" "==" "products/products/" }}
<div class='container'>
<div class='row'>
<div class='col-xs-12'>
Expand Down
10 changes: 5 additions & 5 deletions layouts/section/tools-and-resources.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1>{{ i18n "tools-and-resources"}}</h1>
{{ define "main" }}
<div class="container">
<section>

<!-- PLATFORM TOOLS LIST -->
<div class="section tools-and-resources--platform">
<div class="col-xs-12">
Expand All @@ -22,8 +22,8 @@ <h2>{{ i18n "tools-and-resources-platform-title" | safeHTML }}</h2>
<p>{{ i18n "tools-and-resources-platform-description-3rd" | safeHTML }}</p>
</div>
</div>
{{ $products := where .Site.Pages ".Dir" "==" "tools-and-resources/platform-tools/" }}

{{ $products := where .Site.Pages ".File.Dir" "==" "tools-and-resources/platform-tools/" }}
<div class='row equal'>
{{ $inflight := where .Site.Pages ".Params.status" "==" "in-flight" }}
{{ range $elem_index, $elem_val := $inflight | intersect $products }}
Expand All @@ -45,7 +45,7 @@ <h2>{{ i18n "tools-and-resources-platform-title" | safeHTML }}</h2>
<h2>{{ i18n "tools-and-resources-resources-title" | safeHTML }}</h2>
<p>{{ i18n "tools-and-resources-resources-description" | safeHTML }}</p>
</div>
{{ $products := where .Site.Pages ".Dir" "==" "tools-and-resources/resources/" }}
{{ $products := where .Site.Pages ".File.Dir" "==" "tools-and-resources/resources/" }}
<div class='row equal'>
{{ $inflight := where .Site.Pages ".Params.status" "==" "in-flight" }}
{{ range $elem_index, $elem_val := $inflight | intersect $products }}
Expand All @@ -58,7 +58,7 @@ <h2>{{ i18n "tools-and-resources-resources-title" | safeHTML }}</h2>
</div>
{{ end }}
</div>
</div>
</div>
</section>
</div>

Expand Down

0 comments on commit b87b42d

Please sign in to comment.