github.com/choria-io/go-choria@v0.28.1-0.20240416190746-b3bf9c7d5a45/docs/themes/hugo-theme-relearn/layouts/partials/shortcodes/openapi.html (about)

     1  {{- $page := .page }}
     2  {{- if and (not $page) .context }}
     3    {{- $page = .context }}
     4    {{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'openapi' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#5180" $page.File.Filename }}
     5  {{- end }}
     6  {{- $src := .src }}
     7  {{- $spec := "" }}
     8  {{- $id := cond (or (eq .id nil) (eq .id "")) (partial "make-random-md5.hugo" $page) .id }}
     9  {{- with $page }}
    10  {{- with or
    11    (.Resources.Get $src)
    12    (resources.Get $src)
    13  }}
    14    {{- $spec = .Content }}
    15  {{- end }}
    16  <div class="sc-openapi-wrapper is-loading helper-loading-container">
    17    <div
    18      class="sc-openapi-container"
    19      id="R-openapi-{{ $id }}"
    20      data-openapi-url="{{ $src }}"
    21      data-openapi-spec="{{ $spec | safeHTMLAttr }}"
    22    ></div>
    23  </div>
    24  {{- .Store.Set "hasOpenApi" true }}
    25  {{- end }}