docs/layouts/models/single.html
{{ with .Params.subtitle }}
{{ . }}
{{ end }} {{ .Content }} {{ if and .Params.components (gt (len .Params.components) 0) }}
The Meshery model for {{ .Title }} supports the following components.
{{ end }} {{ range .Params.components }} {{ if .name }}
{{ .name }}
{{ end }} {{ end }} {{ $modelKey := lower (replace .Title " " "-") }} {{ with index site.Data.modelscustominfo $modelKey }} {{ .content | safeHTML }} {{ end }} {{ partialCached "integration/models-components.html" . }} {{ partialCached "integration/meshery-registry.html" . }}
{{ $tech := path.Base (strings.TrimSuffix "/" .Params.docURL) }} {{ $catalogRoot := "catalog" }} {{ range readDir $catalogRoot }} {{ if .IsDir }} {{ $catalogType := .Name }} {{ $catalogTypePath := printf "%s/%s" $catalogRoot $catalogType }} {{ range readDir $catalogTypePath }} {{ if and (not .IsDir) (strings.HasSuffix .Name ".md") }} {{ $filePath := printf "%s/%s" $catalogTypePath .Name }} {{ $raw := readFile $filePath }} {{ $parts := split $raw "---" }} {{ if ge (len $parts) 3 }} {{ $meta := transform.Unmarshal (index $parts 1) }} {{ $compatibility := index $meta "compatibility" }} {{ if and $compatibility (in $compatibility $tech) }} - [{{ index $meta "name" }}](https://meshery.io/catalog/{{%20$catalogType%20}}/{{%20replace%20(index%20$meta) {{ end }} {{ end }} {{ end }} {{ end }} {{ end }} {{ end }}
{{ $tutorialSection := site.GetPage "section" "guides/tutorials" }} {{ if $tutorialSection }} {{ $pageTitleLower := lower .Title }} {{ range $tutorialSection.RegularPages }} {{ $tutorialPage := . }} {{ with $tutorialPage.Params.model }} {{ $tutorialModelLower := lower . }} {{ if in $pageTitleLower $tutorialModelLower }} - {{ $tutorialPage.Title }} {{ end }} {{ end }} {{ end }} {{ end }} {{ if ne .Params.suggested_reading false }} {{ $modelsSection := site.GetPage "section" "extensions/models" }} {{ if $modelsSection }} {{ $related_models := slice }} {{ $currentCategory := index .Params "integrations-category" }} {{ range $modelsSection.RegularPages }} {{ if eq (index .Params "integrations-category") $currentCategory }} {{ $related_models = $related_models | append . }} {{ end }} {{ end }} {{ partialCached "suggested-reading.html" (dict "reading" $related_models "h2_text" "Related Models" "type" .FirstSection.Section "category" (index .Params "integrations-category") "url" .RelPermalink "language" .Lang "section_title" true "display_suggested_reading" true "currentPage" . ) .RelPermalink }} {{ end }} {{ end }}