Skip to content

Commit

Permalink
Revert "Fixes for Hugo v123 (#595)" (#607)
Browse files Browse the repository at this point in the history
This reverts commit 4c2be63.
  • Loading branch information
earthboundkid authored Mar 21, 2024
1 parent fe01559 commit ed05f10
Show file tree
Hide file tree
Showing 18 changed files with 43 additions and 45 deletions.
8 changes: 4 additions & 4 deletions content/elections-2023.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ blurb = "Spotlight PA wants to empower voters to make an informed decision on Ma
url = "/elections-2023/"
layout = "elections"
type = "elections"
guide = "series/voting-guides-2023/_index.md"
guide = "content/series/voting-guides-2023/_index.md"
credits = """
{{<featured/credit
eyebrow="Reporting"
Expand Down Expand Up @@ -133,7 +133,7 @@ title = "PA Election 2023: Candidate and Voting Guides"
slug = "guides"
layout = "story-collection"
timeFilter = "2023-08-01"
collection = "series/voting-guides-2023/_index.md"
collection = "content/series/voting-guides-2023/_index.md"

[[blocks]]
layout = "ballyhoo"
Expand Down Expand Up @@ -185,15 +185,15 @@ title = "PA Election 2023: More Coverage "
slug = "coverage"
layout = "story-collection"
timeFilter = "2023-08-01"
collection = "topics/elections/_index.md"
collection = "content/topics/elections/_index.md"
collectionReadMore = "Read More PA Election 2023 Stories"

[[blocks]]
title = " Elecciones Pa. 2023: Traducciones al Español "
slug = "espanol"
layout = "story-collection"
timeFilter = "2023-08-01"
collection = "topics/español/_index.md"
collection = "content/topics/español/_index.md"
collectionReadMore = "Leer Más Historias De La Elección PA 2023"

[[internal-links]]
Expand Down
8 changes: 4 additions & 4 deletions content/elections-2024.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ aliases = [
]
layout = "elections"
type = "elections"
guide = "series/voting-guides-2024/_index.md"
guide = "content/series/voting-guides-2024/_index.md"
credits = """
{{<featured/credit
eyebrow="Reporting"
Expand Down Expand Up @@ -136,7 +136,7 @@ title = "PA Election 2024: Voter Guides"
slug = "guides"
layout = "story-collection"
timeFilter = "2023-12-01"
collection = "series/voting-guides-2024/_index.md"
collection = "content/series/voting-guides-2024/_index.md"

[[blocks]]
layout = "signup-inline"
Expand All @@ -149,7 +149,7 @@ title = "PA Election 2024: More Coverage"
slug = "coverage"
layout = "story-collection"
timeFilter = "2023-12-01"
collection = "topics/elections/_index.md"
collection = "content/topics/elections/_index.md"
collectionReadMore = "Read More PA Election 2024 Stories"

[[internal-links]]
Expand All @@ -174,4 +174,4 @@ At Spotlight PA, we’re here to help you navigate the Pennsylvania election pro

This April, Democrats and Republicans across Pennsylvania will determine which candidates will go on to run in the general election. This includes presidential, congressional (U.S. House and Senate), row office (attorney general, auditor general, and treasurer), and legislative elections. All of these positions hold tremendous power and responsibility, but it’s the statewide races that will have the most direct impact on Pennsylvanians and the ones you will find the most information about on this page.

We invite suggestions for new features for this page and encourage you to check back regularly for all your 2024 election needs. Read more about [how we’re covering the 2024 Pennsylvania election](https://www.spotlightpa.org/news/2024/01/pennsylvania-2024-election-coverage-president-senate-row-offices-pan/).
We invite suggestions for new features for this page and encourage you to check back regularly for all your 2024 election needs. Read more about [how we’re covering the 2024 Pennsylvania election](https://www.spotlightpa.org/news/2024/01/pennsylvania-2024-election-coverage-president-senate-row-offices-pan/).
32 changes: 16 additions & 16 deletions data/impact.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"date": "2022-10-28",
"dek": "Spotlight PA broke the news that Penn State [hadn’t allocated funding to its Center for Racial Justice.",
"kicker": "Penn State",
"page": "statecollege/2022-10-28-SPLPSUCENTER.md",
"page": "content/statecollege/2022-10-28-SPLPSUCENTER.md",
"url": "https://spotlightpa.org/statecollege/2022/10/penn-state-psu-center-racial-justice-bendapudi/"
},
{
Expand All @@ -15,7 +15,7 @@
"date": "2022-03-30",
"dek": "A Spotlight PA investigation about the state’s broken compassionate relief program.",
"kicker": "Justice System",
"page": "news/2022-03-30-SPLRELEASE30.md",
"page": "content/news/2022-03-30-SPLRELEASE30.md",
"url": "https://spotlightpa.org/news/2022/03/pa-prison-life-sentence-compassionate-release/"
},
{
Expand All @@ -24,7 +24,7 @@
"date": "2021-06-28",
"dek": "State officials updated their policies after A Spotlight PA investigation found failure to clarify federal rules around funding for addiction treatment and medical marijuana use had deadly consequences.",
"kicker": "Health",
"page": "news/2021-06-28-SPLMEDMAR28.md",
"page": "content/news/2021-06-28-SPLMEDMAR28.md",
"url": "https://spotlightpa.org/news/2021/06/pa-medical-marijuana-insurance-drug-treatment-confusion/"
},
{
Expand All @@ -33,7 +33,7 @@
"date": "2019-09-20",
"dek": "After Spotlight PA revealed that the Pennsylvania State Police had quietly stopped tracking the race of drivers who get pulled over the State Police resumed tracking race data from traffic stops and resumed a data analysis partnership.",
"kicker": "Justice System",
"page": "news/2019-09-20-SPLRACE20.md",
"page": "content/news/2019-09-20-SPLRACE20.md",
"url": "https://spotlightpa.org/news/2019/09/pa-state-police-stopped-tracking-driver-race/"
},
{
Expand All @@ -42,7 +42,7 @@
"date": "2021-04-29",
"dek": "A Spotlight PA and Kaiser Health News investigation contributed to a new effort to give the state the authority to fine providers.",
"kicker": "Health",
"page": "news/2021-04-29-SPLDDAP02.md",
"page": "content/news/2021-04-29-SPLDDAP02.md",
"url": "https://spotlightpa.org/news/2021/04/pa-addiction-treatment-facilities-investigation-state-oversight-flawed-violations-harm-clients/"
},
{
Expand All @@ -51,7 +51,7 @@
"date": "2020-08-06",
"dek": "After Spotlight PA published an investigation in 2020 into how Pennsylvania’s higher education system failed students of color, public universities adopted a strategy to address campus racism.",
"kicker": "Education",
"page": "news/2020-08-06-SPLCAMPUS06.md",
"page": "content/news/2020-08-06-SPLCAMPUS06.md",
"url": "https://spotlightpa.org/news/2020/08/pennsylvania-public-universities-colleges-campus-racism/"
},
{
Expand All @@ -60,7 +60,7 @@
"date": "2022-02-21",
"dek": "A yearlong investigation into Pennsylvania’s medical marijuana card program.",
"kicker": "Cannabis Card Game",
"page": "series/unproven-unsafe/_index.md",
"page": "content/series/unproven-unsafe/_index.md",
"url": "https://spotlightpa.org/series/unproven-unsafe/"
},
{
Expand All @@ -69,7 +69,7 @@
"date": "2020-05-09",
"dek": "In spring 2020, Spotlight PA uncovered that the state had a plan to protect nursing homes from COVID-19 but didn’t fully implement it. In response, two state senators sent a letter demanding answers.",
"kicker": "Coronavirus",
"page": "news/2020-05-09-SPLHOMES10.md",
"page": "content/news/2020-05-09-SPLHOMES10.md",
"url": "https://spotlightpa.org/news/2020/05/pennsylvania-coronavirus-nursing-homes-plan-quick-strike-teams/"
},
{
Expand All @@ -78,7 +78,7 @@
"date": "2021-05-01",
"dek": "A Spotlight PA investigative series led to an unprecedented move towards transparency in Harrisburg",
"kicker": "The Hidden Tab",
"page": "series/the-hidden-tab/_index.md",
"page": "content/series/the-hidden-tab/_index.md",
"url": "https://spotlightpa.org/series/the-hidden-tab/"
},
{
Expand All @@ -87,7 +87,7 @@
"date": "2022-11-18",
"dek": "A Spotlight PA and NBC News investigation into the State Police shooting of Christian Hall in the Poconos revealedthat the teenager had his hands in the air when he was shot and killed.",
"kicker": "Justice System",
"page": "news/2021-11-18-SPLHALL19.md",
"page": "content/news/2021-11-18-SPLHALL19.md",
"url": "https://spotlightpa.org/news/2021/11/christian-hall-state-police-shooting-stroudsburg/"
},
{
Expand All @@ -96,7 +96,7 @@
"date": "2023-01-09",
"dek": "A Spotlight PA investigation into the state’s broken system for protecting incarcerated people with mental health needs.",
"kicker": "Justice System",
"page": "news/2023-03-09-SPLCOMPETENCY.md",
"page": "content/news/2023-03-09-SPLCOMPETENCY.md",
"url": "https://spotlightpa.org/news/2023/03/pa-mental-illness-jail-incompetent-treatment/"
},
{
Expand All @@ -105,7 +105,7 @@
"date": "2021-01-29",
"dek": "Spotlight PA found that the Department of Corrections was reporting flawed data about COVID-19 in prisons, prompting the department to remove, revamp, and relaunch a public data dashboard.",
"kicker": "Coronavirus",
"page": "news/2021-01-29-SPLDATA30.md",
"page": "content/news/2021-01-29-SPLDATA30.md",
"url": "https://spotlightpa.org/news/2021/01/pennsylvania-prisons-coronavirus-deaths-data-transparency/"
},
{
Expand All @@ -114,7 +114,7 @@
"date": "2022-08-22",
"dek": "A public records request prevailed in state appellate court, setting new precedential case law regarding the release of aggregate data.",
"kicker": "Health",
"page": "news/2022-08-22-SPLCANORDER.md",
"page": "content/news/2022-08-22-SPLCANORDER.md",
"url": "https://spotlightpa.org/news/2022/08/pa-medical-marijuana-program-addiction-treatment-court-order/"
},
{
Expand All @@ -123,7 +123,7 @@
"date": "2020-08-30",
"dek": "After Spotlight PA and The Appeal reported on illegal stops and searches by the Pennsylvania State Police, the governor requested a formal review.",
"kicker": "Justice System",
"page": "news/2020-08-31-SPLFRISK31.md",
"page": "content/news/2020-08-31-SPLFRISK31.md",
"url": "https://spotlightpa.org/news/2020/08/pa-state-police-troopers-highway-stop-and-frisk/"
},
{
Expand All @@ -132,7 +132,7 @@
"date": "2023-01-23",
"dek": "A Spotlight PA story prompted the state to fire the third-party contractor that was running the program.",
"kicker": "Economy",
"page": "news/2023-01-23-SPLMORTGAGE.md",
"page": "content/news/2023-01-23-SPLMORTGAGE.md",
"url": "https://spotlightpa.org/news/2023/01/pa-homeowner-mortgage-utility-assistance-fund/"
},
{
Expand All @@ -141,7 +141,7 @@
"date": "2023-01-09",
"dek": "A Spotlight PA investigation prompted state officials to admit the error and say it would return $19 million to Pennsylvanians.",
"kicker": "Unemployment",
"page": "news/2021-07-09-SPLUNEMPLOYMENT10.md",
"page": "content/news/2021-07-09-SPLUNEMPLOYMENT10.md",
"url": "https://spotlightpa.org/news/2021/07/pa-department-of-labor-unemployment-claims-overpayment-interest/"
}
]
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/blocks/series.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"text" "w-full md:w-2/6 md:text-right"
}}
{{ end }}
{{ with $seriesPage := site.GetPage (printf "series/%s" (urlize .)) }}
{{ with index site.Taxonomies.series (urlize .) }}
<div class="{{ $classes.block }}">
<div class="{{ $classes.image }}">
{{ $name := .Page.Param "image" }}
Expand Down Expand Up @@ -56,7 +56,7 @@
><p
class="mt-4 text-base uppercase tracking-wider decoration-yellow decoration-4 underline-offset-4 group-hover:underline"
>
{{- printf "%d Articles" (.RegularPages.Len) -}}
{{- printf "%d Articles" (len .) -}}
</p></a
>
</div>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/header/meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
{{- $permalink := .Permalink }}
{{- $siteSeries := .Site.Taxonomies.series }}{{ with .Params.series }}
{{- range $name := . }}
{{- $series := site.GetPage (printf "series/%s" (urlize $name)) }}
{{- $series := index $siteSeries (urlize $name) }}
{{- range $page := first 6 $series.Pages }}
{{- if ne $page.Permalink $permalink }}<meta property="og:see_also" content="{{ $page.Permalink }}" />{{ end }}
{{- end }}
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/helper/get-author.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
{{ $nameID := urlize . }}

{{ $link := "" }}
{{ with $page := site.GetPage (printf "authors/%s" $nameID) }}
{{ $link = $page.RelPermalink }}
{{ with $pages := site.Taxonomies.authors.Get $nameID }}
{{ $link = $pages.Page.RelPermalink }}
{{ end }}

{{ $thumb := "" }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/helper/get-impact-stories.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"eyebrow" .kicker
"url" .url
}}
{{ with $page := site.GetPage (strings.TrimPrefix "content/" .page | default "-") }}
{{ with $page := site.GetPage (.page | default "-") }}
{{ $params := partialCached "helper/page-params" $page.Page $page.RelPermalink }}
{{ $item = $item | merge (dict
"page" $page
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/helper/get-items.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"linkColor" .linkColor
"backgroundColor" .backgroundColor
}}
{{ with $page := site.GetPage (strings.TrimPrefix "content/" .page | default "-") }}
{{ with $page := site.GetPage (.page | default "-") }}
{{ $params := partialCached "helper/page-params" $page.Page $page.RelPermalink }}
{{ $item = $item | merge (dict
"page" $page
Expand Down
4 changes: 1 addition & 3 deletions layouts/partials/helper/get-stories.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{{ $stories := slice }}
{{ $src := index site.Data .src }}
{{ range index $src .name }}
{{ with site.GetPage (strings.TrimPrefix "content/" .) }}
{{ with site.GetPage . }}
{{ $stories = $stories | append . }}
{{ else }}
{{ warnf "unknown story path %q" . }}
{{ end }}
{{ end }}

Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/helper/paginator.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/}}

{{ $p := "" }}
{{ if and .IsNode (ne .Kind "404") }}
{{ if .IsNode }}
{{ $sort := .Param "sort-by" }}
{{ $size := .Param "paginate" | default 30 }}
{{ if eq $sort "pub" | or (eq $sort "oldest") }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/tw/frontpage.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ <h2 class="text-2xl font-extrabold">
}}
{{ end }}
{{ if .featuredTopics }}
{{ $pages := site.GetPage "topics/the-capitol/_index.md" }}
{{ $pages := site.GetPage "content/topics/the-capitol/_index.md" }}
{{ partial "tw/list-callout-story.html" (dict
"hed" "The Capitol"
"pages" $pages.RegularPages
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/tw/homepage.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{{ $editorPicksCallout := partial "helper/get-hp-picks" "edCallout" }}
{{ $edInvestigations := partial "helper/get-hp-picks" "edInvestigations" }}
{{ $edImpact := partial "helper/get-hp-picks" "edImpact" }}
{{ $featuredTopics := "topics/the-capitol/_index.md" }}
{{ $featuredTopics := "content/topics/the-capitol/_index.md" }}
{{ $newsletter := site.GetPage "/newsletters/papost/_index.md" }}

{{ $edNewsletter := "tw/list-callout-newsletter.html" }}
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/tw/main-court-tool.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{ .Content }}
</article>

{{ $elex := site.GetPage "series/pa-courts-101/_index.md" }}
{{ $elex := site.GetPage "content/series/pa-courts-101/_index.md" }}

{{ $pages := $elex.RegularPages }}
{{ $primary := (time "2023-08-01").Unix }}
Expand All @@ -27,7 +27,7 @@
}}
</section>
{{ end }}
{{ $vet := site.GetPage "series/vetting-candidates/_index.md" }}
{{ $vet := site.GetPage "content/series/vetting-candidates/_index.md" }}
{{ $primary := (time "2023-08-01").Unix }}
{{ $vetCand := where $vet.RegularPages
".PublishDate.Unix" "gt" $primary
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/tw/main-transparency-tracker.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
id="transparency-tracker-stories"
data-ga-category="guides"
>
{{ $guide := site.GetPage "topics/transparency-tracker/_index.md" }}
{{ $guide := site.GetPage "content/topics/transparency-tracker/_index.md" }}
{{ partial "tw/list-3-col-story.html" (dict
"hed" "Transparency Stories"
"pages" $guide.RegularPages
Expand Down Expand Up @@ -60,7 +60,7 @@
id="penn-state-stories"
data-ga-category="guides"
>
{{ $guide := site.GetPage "topics/penn-state/_index.md" }}
{{ $guide := site.GetPage "content/topics/penn-state/_index.md" }}
{{ partial "tw/list-3-col-story.html" (dict
"hed" "All Penn State Stories"
"pages" $guide.RegularPages
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/tw/rail-events.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ $events := site.GetPage "/topics/events/_index.md" }}
{{ $events := site.GetPage "content/topics/events/_index.md" }}
{{ $pages := $events.RegularPages }}
{{ $upcomingEvents := where $pages `Params.event-date` "gt" now }}
{{ $upcomingEvents = sort $upcomingEvents `Params.event-date` "asc" }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/featured/related-stories.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{{ $name := .Get "title" }}

{{ with .Get "topic" }}
{{ $topic = site.GetPage (printf "topics/" (urlize . )) }}
{{ $topic = (site.Taxonomies.topic.Get (urlize . )).Page }}
{{ $name = "Spotlight PA" }}
{{ end }}
{{ with .Get "title" }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/featured/series.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{ $series := $params.series }}
{{ $name := "This Series" }}
{{ with .Get "series" }}
{{ $series = site.GetPage (printf "series/%s" (urlize .)) }}
{{ $series = (site.Taxonomies.series.Get (urlize . )).Page }}
{{ $name = "Spotlight PA" }}
{{ end }}
{{ $pages := $series.Pages.ByPublishDate }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/featured/topic.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{ $topic := $params.topic }}
{{ $name := $topic.Title }}
{{ with .Get "topic" }}
{{ $topic = site.GetPage (printf "topics/" (urlize . )) }}
{{ $topic = (site.Taxonomies.topic.Get (urlize . )).Page }}
{{ $name = "Spotlight PA" }}
{{ end }}
{{ with .Get "title" }}
Expand Down

0 comments on commit ed05f10

Please sign in to comment.