get_logo_url.html 420 B

123456789101112
  1. {{/* Function to get logo URL for JSONLD. */}}
  2. {{/* Inputs: page context */}}
  3. {{/* Output: logo URL (URL) */}}
  4. {{ $logo_url := "" }}
  5. {{ if resources.Get "media/logo.png" | or (resources.Get "media/logo.svg") }}
  6. {{ $logo_url = (partial "functions/get_logo" (dict "constraint" "fit" "size" 192)).Permalink }}
  7. {{ else }}
  8. {{ $logo_url = (partial "functions/get_icon" 192).Permalink }}
  9. {{ end }}
  10. {{ return $logo_url }}