feat: add redaction
This commit is contained in:
parent
a35946ae92
commit
b2dba13746
8 changed files with 1373 additions and 103 deletions
|
@ -30,7 +30,7 @@
|
|||
{{- .Scratch.Set "i" 0 -}}
|
||||
{{- range ( .GetTerms "skills" ).ByTitle -}}
|
||||
{{- if hasPrefix .LinkTitle "CIISec/" -}}
|
||||
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a> <span class="level">{{ index $.Params.skills_ciisec_levels ( $.Scratch.Get "i" ) }}</span></li>
|
||||
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a> <span class="level">(level {{ index $.Params.skills_ciisec_levels ( $.Scratch.Get "i" ) }})</span></li>
|
||||
{{- $.Scratch.Add "i" 1 -}}
|
||||
{{- else -}}
|
||||
<li class="p-category"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||
|
@ -49,7 +49,13 @@
|
|||
{{- range ( .GetTerms "organisations" ) -}}
|
||||
{{ with ( where $all_organisations "Title" ( .Title | plainify ) ) }}
|
||||
{{ range . }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ if ( .Params.markup_title ) }}{{ .Params.markup_title | safeHTML }}{{ else }}{{ .Title }}{{ end }}</a></li>
|
||||
{{- if ( and ( .Params.redact ) ( ne $.Site.Params.redact "show" ) ) -}}
|
||||
{{- if ( eq $.Site.Params.redact "black" ) -}}
|
||||
<li>{{- partialCached "redact-black.html" . -}}</li>
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
<li><a href="{{ .RelPermalink }}">{{ if ( .Params.markup_title ) }}{{ .Params.markup_title | safeHTML }}{{ else }}{{ .Title }}{{ end }}</a></li>
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ erroridf "missing-organisation" "Could not find organisation %q (%q)" .Title $.File.Path }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue