github.com/rabbouni145/gg@v0.47.1/docs/themes/gohugoioTheme/layouts/shortcodes/docfile.html (about)

     1  {{ $file := .Get 0}}
     2  {{ $filepath := $file }}
     3  {{ $syntax := index (split $file ".") 1 }}
     4  {{ $syntaxoverride := eq (len .Params) 2 }}
     5  <div class="code-copy" id="{{$file | urlize}}">
     6  	<div class="code-copy-header"><div class="action-buttons"></div><span title="" class="filename">{{$filepath}}</span><i class="icon-{{$syntax}} input"></i></div>
     7  	<button class="copy-button" title="Copy to clipboard" data-clipboard-snippet>
     8  			<div class="copy-text"><i class="icon-clipboard"></i> COPY</div>
     9  	</button>
    10  	<pre><code class="language-{{if $syntaxoverride}}{{.Get 1}}{{else}}{{$syntax}}{{end}}">{{- readFile $file -}}</code></pre>
    11  </div>