File tree Expand file tree Collapse file tree
layouts/partials/clusters Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66{{ $summary := $p.Params.summary | default $p.Description | default "" }}
77{{ if eq $summary "" }}
8- {{ with $c.description }}{{ $summary = plainify . | truncate 300 "…" }}{{ end }}
8+ {{ with $c.description }}{{ $summary = . }}{{ end }}
99{{ end }}
1010{{ if eq $summary "" }}{{ $summary = printf "FORRT Cluster %d: %s." (int $c.number) $c.name }}{{ end }}
11+ {{ $summary = plainify $summary | truncate 300 "…" }}
12+ {{/* Defense-in-depth: prevent literal </ script from terminating the tag */}}
13+ {{ $summary = replaceRE "(?i)</ script" "< \\/script" $summary }}
1114
1215{{ $hubURL := "clusters/" | absURL }}
1316
2427
2528{{ $graph := slice $webpage $breadcrumb }}
2629{{ $root := dict "@context" "https://schema.org" "@graph" $graph }}
27- < script type ="application/ld+json "> { { $root | jsonify | safeHTML } } </ script >
30+ < script type ="application/ld+json "> { { $root | jsonify | safeJS } } </ script >
Original file line number Diff line number Diff line change 44
55{{ $summary := .Params.summary | default .Description | default "" }}
66{{ if eq $summary "" }}
7- {{ with .Summary }}{{ $summary = plainify . | truncate 300 "…" }}{{ end }}
7+ {{ with .Summary }}{{ $summary = . }}{{ end }}
88{{ end }}
99{{ if eq $summary "" }}{{ $summary = "FORRT open science clusters taxonomy for educators and researchers." }}{{ end }}
10+ {{ $summary = plainify $summary | truncate 300 "…" }}
11+ {{/* Defense-in-depth: prevent literal </ script from terminating the tag */}}
12+ {{ $summary = replaceRE "(?i)</ script" "< \\/script" $summary }}
1013
1114{{ $elements := slice }}
1215{{ range $i, $c := $data.clusters }}
2730{{ $itemlist := dict "@type" "ItemList" "@id" (printf "%s#itemlist" .Permalink) "name" "FORRT Open Science Clusters" "description" "Full taxonomy of open and reproducible science clusters with sub-clusters and teaching references." "numberOfItems" (len $data.clusters) "itemListElement" $elements }}
2831{{ $graph := slice $webpage $itemlist }}
2932{{ $root := dict "@context" "https://schema.org" "@graph" $graph }}
30- < script type ="application/ld+json "> { { $root | jsonify | safeHTML } } </ script >
33+ < script type ="application/ld+json "> { { $root | jsonify | safeJS } } </ script >
You can’t perform that action at this time.
0 commit comments