hugo-theme-relearn/layouts/partials/shortcodes/openapi.html
2023-05-18 14:01:50 +02:00

18 lines
No EOL
495 B
HTML

{{- $context := .context }}
{{- $src := .src }}
{{- $id := cond (or (eq .id nil) (eq .id "")) (partial "make-random-md5.hugo" $context) .id }}
{{- with $context }}
{{- with .Resources.Match $src }}
{{- range . }}
{{- $src = .RelPermalink }}
{{- end }}
{{- end }}
<div class="sc-openapi-wrapper is-loading helper-loading-container">
<div
class="sc-openapi-container"
id="openapi-{{ $id }}"
openapi-url="{{ $src }}"
></div>
</div>
{{- .Store.Set "hasOpenapi" true }}
{{- end }}