mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
Merge commit 'dd78d5b23fe597f4461aa4199401b4e07c0612e2' as 'docs'
This commit is contained in:
26
docs/layouts/shortcodes/datatable-vertical.html
Normal file
26
docs/layouts/shortcodes/datatable-vertical.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{{ $package := (index .Params 0) }}
|
||||
{{ $listname := (index .Params 1) }}
|
||||
{{ $list := (index (index .Site.Data.docs $package) $listname) }}
|
||||
{{ $fields := after 2 .Params }}
|
||||
<table class="table table-bordered">
|
||||
{{ range $list }}
|
||||
{{ range $k, $v := . }}
|
||||
{{ $.Scratch.Set $k $v }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ range $i, $_ := $fields }}
|
||||
<tr>
|
||||
{{ $.Scratch.Set "i" $i }}
|
||||
|
||||
{{ $field := (index $fields ($.Scratch.Get "i") ) }}
|
||||
<th>{{ $field }}</th>
|
||||
{{ range $list }}
|
||||
<td>
|
||||
{{ index . $field }}
|
||||
</td>
|
||||
{{ end }}
|
||||
|
||||
</tr>
|
||||
{{ end }}
|
||||
</table>
|
23
docs/layouts/shortcodes/datatable.html
Normal file
23
docs/layouts/shortcodes/datatable.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{{ $package := (index .Params 0) }}
|
||||
{{ $listname := (index .Params 1) }}
|
||||
{{ $list := (index (index .Site.Data.docs $package) $listname) }}
|
||||
{{ $fields := after 2 .Params }}
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
{{ range $fields }}
|
||||
<th>{{ . }}</th>
|
||||
{{ end }}
|
||||
</tr>
|
||||
{{ range $list }}
|
||||
<tr>
|
||||
{{ range $k, $v := . }}
|
||||
{{ $.Scratch.Set $k $v }}
|
||||
{{ end }}
|
||||
{{ range $fields }}
|
||||
<td>{{ $.Scratch.Get . }}</td>
|
||||
{{ end }}
|
||||
</tr>
|
||||
{{ end }}
|
||||
</table>
|
||||
|
13
docs/layouts/shortcodes/directoryindex.html
Normal file
13
docs/layouts/shortcodes/directoryindex.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{{- $pathURL := .Get "pathURL" -}}
|
||||
{{- $path := .Get "path" -}}
|
||||
{{- $files := readDir $path -}}
|
||||
<table>
|
||||
<th>Size in bytes</th>
|
||||
<th>Name</th>
|
||||
{{- range $files }}
|
||||
<tr>
|
||||
<td>{{ .Size }}</td>
|
||||
<td><a href="{{ $pathURL }}{{ .Name | relURL }}"> {{ .Name }}</a></td>
|
||||
</tr>
|
||||
{{- end }}
|
||||
</table>
|
9
docs/layouts/shortcodes/gh.html
Normal file
9
docs/layouts/shortcodes/gh.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{{ range .Params }}
|
||||
{{ if eq (substr . 0 1) "@" }}
|
||||
<a href="//github.com/{{ substr . 1 }}">{{ . }}</a>
|
||||
{{ else if eq (substr . 0 2) "0x" }}
|
||||
<a href="//github.com/gohugoio/hugo/commit/{{ substr . 2 }}">{{ substr . 2 6 }}</a>
|
||||
{{ else }}
|
||||
<a href="//github.com/gohugoio/hugo/issues/{{ . }}">#{{ . }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
1
docs/layouts/shortcodes/nohighlight.html
Normal file
1
docs/layouts/shortcodes/nohighlight.html
Normal file
@@ -0,0 +1 @@
|
||||
<pre><code class="hljs nohighlight">{{ .Inner }}</code></pre>
|
1
docs/layouts/shortcodes/readfile.html
Normal file
1
docs/layouts/shortcodes/readfile.html
Normal file
@@ -0,0 +1 @@
|
||||
{{- .Get 0 | readFile -}}
|
4
docs/layouts/shortcodes/youtube.html
Normal file
4
docs/layouts/shortcodes/youtube.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<div class="video-container">
|
||||
<iframe class="youtube-player" type="text/html" width="100%" height="auto" src="https://www.youtube.com/embed/{{ index .Params 0 }}" allowfullscreen frameborder="0">
|
||||
</iframe>
|
||||
</div>
|
Reference in New Issue
Block a user