{{- /* A concept's record as a catalogue card: its type, genre and tags, with its id as the call number; its trust label in the report script's own words; its definition; and the rest of its record, where a source the ingest mirrored names where it came from. Search files the page under a Type, a Genre and a Trust filter. A retired concept that points here is left out, as the report counts it for none; its own card keeps the relation. */ -}} {{- $c := .Params.concept -}} {{- $id := .Params.conceptId -}} {{- $all := partialCached "concepts.html" "concepts" -}} {{- $t := (index $all.id $id).trust -}} {{- $repo := site.Params.repo -}} {{- $ref := site.Params.ref | default site.Params.branch -}} {{- $type := partial "slot-name.html" ($c.type | default "Concept") -}} {{- $checks := $c.verified | default slice -}} {{- if reflect.IsMap $checks }}{{ $checks = slice $checks }}{{ end -}}
{{- /* A genre that only repeats the type is filed for search and not shown twice. */}} {{- $same := and $c.genre (eq (lower $c.genre) (lower $type)) }}
{{ $type }} {{- if not $same }}{{ with $c.genre }} {{ . }}{{ end }}{{ end }} {{- range $c.tags }} {{ . }}{{ end }} {{ $id }}

{{ $t.rung | strings.FirstUpper }}

{{- with $t.also }}

{{ . }}

{{ end }}

{{- with $c.generated }}Written {{ substr .at 0 10 }} by {{ partial "actor.html" .by }}. {{ end }} {{- with last 1 $checks }}{{ with index . 0 }}Last checked {{ substr .at 0 10 }} by {{ partial "actor.html" .by }}.{{ end }}{{ end -}}

{{- with $c.definition }}

{{ partial "inline.html" . }}

{{- end }}
The full record
Checks
{{- with $checks }}
    {{- range . }}
  • {{ substr .at 0 10 }} by {{ partial "actor.html" .by }}{{ with .revision }} at {{ substr . 0 7 }}{{ end }}{{ with .note }}: {{ . }}{{ end }}
  • {{ end -}}
{{ else }}none recorded{{ end -}}
{{- with $c.stale_after }}
Review by
{{ . }}
{{ end }} {{- $sources := $c.sources | default (cond (eq $c.resource nil) slice (slice $c.resource)) }} {{- with $sources }}
Sources
    {{- range . }} {{- $at := . }}{{ if reflect.IsMap . }}{{ $at = or .resource .url .id }}{{ end }}{{ $at = string $at }} {{- $path := $at | replaceRE `^\.(?:/|$)` "" | strings.TrimSuffix "/" }} {{- $href := cond (findRE `^https?:` $at | len | lt 0) $at (cond (eq $path "") (printf "%s/tree/%s" $repo $ref) (printf "%s/blob/%s/%s" $repo $ref $path)) }}
  • {{ cond (eq $path "") "the whole repository" $at }} {{- with index (partialCached "mirrors.html" "mirrors") $path }}{{ $m := . }}

    A copy of {{ with $m.href }}{{ $m.origin }}{{ else }}{{ $m.origin }}{{ end }} {{- with $m.version }}, version {{ . }}{{ end }}{{ with $m.retrieved }}, fetched {{ . }}{{ end }}.

    {{- end }} {{- if reflect.IsMap . }}{{ with .excerpt }}
    {{ . }}
    {{ end }}{{ end }}
  • {{- end }}
{{- end }} {{- $iri := $c.id }} {{- $out := where $all.edges "data.source" $iri }} {{- $slots := slice }}{{ range $out }}{{ $slots = $slots | append .data.slot }}{{ end }} {{- range $slot := $slots | uniq | sort }}
{{ partial "slot-name.html" $slot }}
    {{ range where $out "data.slot" $slot }}
  • {{ partial "concept-link.html" .data.target }}
  • {{ end }}
{{- end }} {{- $in := slice }} {{- range where $all.edges "data.target" $iri }} {{- $from := index $all.iri .data.source }} {{- if not (and $from (eq $from.trust.tone "retired")) }}{{ $in = $in | append . }}{{ end }} {{- end }} {{- with $in }}
Pointed to by
    {{ range . }}
  • {{ partial "concept-link.html" .data.source }} ({{ partial "slot-name.html" .data.slot | lower }})
  • {{ end }}
{{- end }}
Graph
Open this concept in the knowledge graph
{{- with $iri }}
IRI
{{ . }}
{{ end }} {{- with or $c.license (site.GetPage "/knowledge").Params.concept.license }}
Licence
{{ partial "licence.html" . }}
{{- end }}
Files
Markdown {{- with .OutputFormats.Get "jsonld" }} JSON-LD{{ end }} Source on GitHub History on GitHub