Skip to content

Commit

Permalink
Fixup .File.Dir warning from Hugo.
Browse files Browse the repository at this point in the history
This PR removes the .File.Dir warning generated by Hugo on startup. It
does this by removing the use of .File.Dir and adding a new key into the
parameters for each of our types of things (partnership, platform-tool
or resource). This key is then used `.Params.productkind` to do the
filtering instead of the `.File.Dir` check.

Issue #2052
  • Loading branch information
dj2 committed May 31, 2021
1 parent 5e63ea8 commit 3dced46
Show file tree
Hide file tree
Showing 34 changed files with 67 additions and 36 deletions.
1 change: 1 addition & 0 deletions content/en/products/products/e-briefing-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >-
An application to replace internal paper-based briefing binders.
phase: alpha
status: past
productkind: partnership
onhomepage: false
contact:
- email: mario.garneau@tbs-sct.gc.ca
Expand Down
1 change: 1 addition & 0 deletions content/en/products/products/energuide-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >-
A public-facing application programming interface (API) to open up access to EnerGuide Home Energy Ratings data in a transparent and reusable way.
phase: alpha
status: past
productkind: partnership
onhomepage: false
contact:
- email: jennifer.fletcher@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: >-
product-url: https://covid-benefits.alpha.canada.ca/en/start
phase: alpha
status: past
productkind: partnership
onhomepage: false
contact:
- email: CDS-SNC@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >-
An online tool to make it easier for Veterans and their family members to determine which benefits, programs, and services are relevant to them.
phase: live
status: past
productkind: partnership
onhomepage: false
contact:
- email: courtney.claessens@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: >-
product-url: https://www.canada.ca/en/public-health/services/diseases/coronavirus-disease-covid-19/covid-alert.html
phase: live
status: in-flight
productkind: partnership
onhomepage: true
contact:
- email: CDS-SNC@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >-
Providing guidance on efforts to engage Canadians on regulations by identifying and validating user and business needs, conducting a market analysis of existing digital products, and presenting recommendations concerning procuring a product vs. building and maintaining a custom product.
phase: discovery
status: past
productkind: partnership
onhomepage: false
contact:
- email: CDS-SNC@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >-
Exploring how to improve service delivery for Canadians with disabilities and their children who apply for Canada Pension Plan (CPP) benefits.
phase: alpha
status: in-flight
productkind: partnership
onhomepage: true
contact:
- email: courtney.claessens@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: >-
product-url: https://claim-tax-benefits.herokuapp.com/start
phase: beta
status: past
productkind: partnership
onhomepage: false
contact:
- email: clementine.hahn@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: >-
product-url: https://impact.canada.ca/
phase: beta
status: past
productkind: partnership
onhomepage: false
contact:
- email: CDS-SNC@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >-
Exploring a service to create a modern, single point of access to all tenders across governments, including publicly funded academic, social, and health institutions.
phase: discovery
status: past
productkind: partnership
onhomepage: false
contact:
- email: steven.talbot@cds-snc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: >-
product-url: https://opencall-appelouvert.alpha.canada.ca/#/
phase: alpha
status: in-flight
productkind: partnership
onhomepage: true
contact:
- email: honey.dacanay@da-an.ca
Expand Down
1 change: 1 addition & 0 deletions content/en/products/products/report-a-cybercrime.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >-
Iterating on a service that makes it easier for victims of cybercrime to report an incident and get guidance on what they can do to protect themselves.
phase: beta
status: in-flight
productkind: partnership
onhomepage: true
contact:
- email: emily.kuret@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >-
A service that allows people to reschedule their citizenship test online, moving away from paper-based processes and providing a simpler, easier and faster user experience for citizenship applicants.
phase: beta
status: past
productkind: partnership
onhomepage: false
contact:
- email: CDS-SNC@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >-
An online tool to check which government sites and web services are meeting good security practices, such as requiring privacy-protecting Hypertext Transfer Protocol Secure (HTTPS) connections.
phase: beta
status: past
productkind: partnership
onhomepage: false
contact:
- email: courtney.claessens@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: >-
product-url: https://github.com/cds-snc/a11y-tracker
phase: alpha
status: in-flight
productkind: platform-tool
onhomepage: false
contact:
- email: julie-ann.rowsell@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >-
Researching a common way of booking appointments with government, to get people the in-person assistance they need.
phase: discovery
status: in-flight
productkind: platform-tool
onhomepage: false
contact:
- email: steven.talbot@cds-snc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: >-
product-url: https://github.com/cds-snc/bundle-size-tracker
phase: beta
status: in-flight
productkind: platform-tool
onhomepage: false
contact:
- email: CDSPlatform.PlateformesSNC@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: >-
product-url: https://github.com/cds-snc/logDriver
phase: beta
status: in-flight
productkind: platform-tool
onhomepage: false
contact:
- email: CDSPlatform.PlateformesSNC@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >-
Security and risk management is often thought of at the end of a delivery phase, which prevents delivery teams from continuous delivery - we're working with IT security professionals and delivery teams to understand what it will take to make continuous security a reality.
phase: discovery
status: in-flight
productkind: platform-tool
onhomepage: false
contact:
- email: caitlin.tuba@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: >-
product-url: https://github.com/cds-snc/dependency-checker
phase: beta
status: in-flight
productkind: platform-tool
onhomepage: false
contact:
- email: CDSPlatform.PlateformesSNC@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: >-
product-url: https://github.com/cds-snc/github-actions
phase: beta
status: in-flight
productkind: platform-tool
onhomepage: false
contact:
- email: CDSPlatform.PlateformesSNC@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: >-
product-url: https://forms-formulaires.alpha.canada.ca/id/20
phase: alpha
status: in-flight
productkind: platform-tool
onhomepage: false
contact:
- email: steven.talbot@cds-snc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: >-
product-url: https://github.com/cds-snc/kubernetes-branch-review
phase: beta
status: in-flight
productkind: platform-tool
onhomepage: false
contact:
- email: CDSPlatform.PlateformesSNC@tbs-sct.gc.ca
Expand Down
3 changes: 2 additions & 1 deletion content/en/tools-and-resources/platform-tools/notify.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
title: 'Notify'
translationKey: notify-product
description: >-
Keeping people updated as they use government services, by providing a simple and efficient way for government to build simple email and text notifications into their services.
Keeping people updated as they use government services, by providing a simple and efficient way for government to build simple email and text notifications into their services.
product-url: https://notification.canada.ca/
phase: beta
status: in-flight
productkind: platform-tool
onhomepage: false
contact:
- email: bryan.willey@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: >-
product-url: https://github.com/cds-snc/pii-checker
phase: beta
status: in-flight
productkind: platform-tool
onhomepage: false
contact:
- email: CDSPlatform.PlateformesSNC@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: >-
product-url: https://github.com/cds-snc/security-goals
phase: alpha
status: in-flight
productkind: platform-tool
onhomepage: false
contact:
- email: CDSPlatform.PlateformesSNC@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: >-
product-url: https://github.com/cds-snc/tti-tools-tracker
phase: alpha
status: in-flight
productkind: platform-tool
onhomepage: false
contact:
- email: CDSPlatform.PlateformesSNC@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >-
A 101 on research interviewing.
phase: live
status: in-flight
productkind: resource
onhomepage: false
contact:
- email: CDS-SNC@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >-
A 101 on usability testing.
phase: live
status: in-flight
productkind: resource
onhomepage: false
contact:
- email: CDS-SNC@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >-
A set of guidelines for creating accessible and inclusive content for people with disabilities.
phase: alpha
status: in-flight
productkind: resource
onhomepage: false
contact:
- email: julie-ann.rowsell@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >-
An outline of how CDS evaluates products and how they are delivered.
phase: live
status: in-flight
productkind: resource
onhomepage: false
contact:
- email: CDS-SNC@tbs-sct.gc.ca
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >-
A list of articles to learn more about digital service delivery and technology modernization.
phase: live
status: in-flight
productkind: resource
onhomepage: false
contact:
- email: sean.boots@tbs-sct.gc.ca
Expand Down
32 changes: 16 additions & 16 deletions layouts/section/partnerships.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h2>{{ i18n "what-were-working-on" }}</h2>

{{ $blog_url := "picking-our-projects" }}
{{ if eq $.Site.Language.Lang "fr" }}
{{ $blog_url = "choisir-nos-projets" }}
{{ $blog_url = "choisir-nos-projets" }}
{{ end }}
<a href="{{with $.Site.GetPage $blog_url}}{{.Permalink}}{{ end }}">
{{ i18n "blog-post" }}.
Expand All @@ -83,7 +83,7 @@ <h2>{{ i18n "what-were-working-on" }}</h2>
</div>

<!-- In-flight partnerships -->
{{ $products := where .Site.Pages ".File.Dir" "==" "products/products/" }}
{{ $products := where .Site.Pages ".Params.productkind" "==" "partnership" }}
<div class='container'>
<div class='row'>
<div class='col-xs-12'>
Expand All @@ -93,13 +93,13 @@ <h3>{{ i18n "partnerships-inflight" }}</h3>
<div class='row equal'>
{{ $inflight := where .Site.Pages ".Params.status" "==" "in-flight" }}
{{ range $elem_index, $elem_val := $inflight | intersect $products }}
{{ if and (ne $elem_index 0) (eq (mod $elem_index 2) 0) }}
</div>
<div class='row equal'>
{{ end }}
<div class='col-md-6 col-xs-12'>
{{ .Render "list"}}
</div>
{{ if and (ne $elem_index 0) (eq (mod $elem_index 2) 0) }}
</div>
<div class='row equal'>
{{ end }}
<div class='col-md-6 col-xs-12'>
{{ .Render "list"}}
</div>
{{ end }}
</div>
</div>
Expand All @@ -114,13 +114,13 @@ <h3>{{ i18n "partnerships-past" }}</h3>
<div class='row equal'>
{{ $past := where .Site.Pages ".Params.status" "==" "past" }}
{{ range $elem_index, $elem_val := $past | intersect $products }}
{{ if and (ne $elem_index 0) (eq (mod $elem_index 2) 0) }}
</div>
<div class='row equal'>
{{ end }}
<div class='col-md-6 col-xs-12'>
{{ .Render "list"}}
</div>
{{ if and (ne $elem_index 0) (eq (mod $elem_index 2) 0) }}
</div>
<div class='row equal'>
{{ end }}
<div class='col-md-6 col-xs-12'>
{{ .Render "list"}}
</div>
{{ end }}
</div>
</div>
Expand Down
37 changes: 18 additions & 19 deletions layouts/section/tools-and-resources.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h2>{{ i18n "tools-and-resources-platform-title" | safeHTML }}</h2>
</div>
</div>

{{ $products := where .Site.Pages ".File.Dir" "==" "tools-and-resources/platform-tools/" }}
{{ $products := where .Site.Pages ".Params.productkind" "==" "platform-tool" }}
<div class='row equal'>
{{ $inflight := where .Site.Pages ".Params.status" "==" "in-flight" }}
{{ range $elem_index, $elem_val := $inflight | intersect $products }}
Expand All @@ -40,29 +40,28 @@ <h2>{{ i18n "tools-and-resources-platform-title" | safeHTML }}</h2>

<!-- RESOURCES LIST -->
<div class="section tools-and-resources--resources">

<div class="col-xs-12">
<h2>{{ i18n "tools-and-resources-resources-title" | safeHTML }}</h2>
<p>{{ i18n "tools-and-resources-resources-description" | safeHTML }}</p>
</div>
{{ $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 }}
{{ if and (ne $elem_index 0) (eq (mod $elem_index 2) 0) }}
</div>
<div class='row equal'>
{{ end }}
<div class='col-md-6 col-xs-12'>
{{ .Render "list"}}
</div>
{{ end }}
<div class="col-xs-12">
<h2>{{ i18n "tools-and-resources-resources-title" | safeHTML }}</h2>
<p>{{ i18n "tools-and-resources-resources-description" | safeHTML }}</p>
</div>
{{ $products := where .Site.Pages ".Params.productkind" "==" "resource" }}
<div class='row equal'>
{{ $inflight := where .Site.Pages ".Params.status" "==" "in-flight" }}
{{ range $elem_index, $elem_val := $inflight | intersect $products }}
{{ if and (ne $elem_index 0) (eq (mod $elem_index 2) 0) }}
</div>
<div class='row equal'>
{{ end }}
<div class='col-md-6 col-xs-12'>
{{ .Render "list"}}
</div>
{{ end }}
</div>
</div>
</section>
</div>

<section class="section section--mailing-list">
{{ partial "mailing-list.html" }}
</section>
{{ end }}
{{ end }}

0 comments on commit 3dced46

Please sign in to comment.