<!--
Highlights file and provides download link, collapsed by default.
Argument file = File path below /src/
Argument title = Summary text (optional, defaults to filename)
-->
{{- $src := (.Get "file") }}
{{- $title := .Get "title" | default $src }}
{{- $lang := .Get "language" | default ("python") }}
{{- $opt := .Get "opt" | default ("linenos=table") }}
{{- $path := (printf "/static/py/auto/Examples/%s" $src) }}
{{- $file := $path | readFile }}
<details>
<summary>{{ $title }}</summary>
{{- highlight (print $file) $lang $opt }}
<a class="linktofile"
   href="{{.Site.Params.url_blob}}/auto/Examples/{{(printf $src)}}"/>auto/Examples/{{$src}}</a>
</details>
