mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-30 10:12:40 +00:00
Remove duplicate shortcodes
This commit is contained in:
@@ -48,7 +48,6 @@ If you are going to create [custom shortcodes](/templates/shortcode-templates/)
|
||||
{{% /warning %}}
|
||||
|
||||
[called directly in the Hugo docs]: https://github.com/gohugoio/hugoDocs/blob/master/content/en/templates/files.md
|
||||
[dirindex]: https://github.com/gohugoio/hugo/blob/master/docs/layouts/shortcodes/directoryindex.html
|
||||
[osfileinfo]: https://golang.org/pkg/os/#FileInfo
|
||||
[readDir]: /functions/readdir/
|
||||
[readFile]: /functions/readfile/
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<div class="code">
|
||||
<pre><code>
|
||||
├── blog
|
||||
│ ├── _index.md [section]
|
||||
│ ├── first-post.md [page]
|
||||
│ └── second-post
|
||||
│ ├── index.md [page bundle]
|
||||
│ └── photo.jpg [page resource]
|
||||
└── tags
|
||||
├── _index.md [taxonomy]
|
||||
└── funny
|
||||
└── _index.md [term]
|
||||
</code></pre>
|
||||
</div>
|
||||
@@ -1,13 +0,0 @@
|
||||
{{- $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 }}" target="_blank"> {{ .Name }}</a></td>
|
||||
</tr>
|
||||
{{- end }}
|
||||
</table>
|
||||
@@ -1,11 +0,0 @@
|
||||
{{ $file := .Get 0}}
|
||||
{{ $filepath := $file }}
|
||||
{{ $syntax := index (split $file ".") 1 }}
|
||||
{{ $syntaxoverride := eq (len .Params) 2 }}
|
||||
<div class="code-copy" id="{{$file | urlize}}">
|
||||
<div class="code-copy-header"><div class="action-buttons"></div><span title="" class="filename">{{$filepath}}</span><i class="icon-{{$syntax}} input"></i></div>
|
||||
<button class="copy-button" title="Copy to clipboard" data-clipboard-snippet>
|
||||
<div class="copy-text"><i class="icon-clipboard"></i> COPY</div>
|
||||
</button>
|
||||
<pre><code class="language-{{if $syntaxoverride}}{{.Get 1}}{{else}}{{$syntax}}{{end}}">{{- readFile $file -}}</code></pre>
|
||||
</div>
|
||||
@@ -1,12 +0,0 @@
|
||||
{{ $file := .Get 0}}
|
||||
{{ $filepath := replace $file "static/" ""}}
|
||||
{{ $syntax := index (split $file ".") 1 }}
|
||||
{{ $syntaxoverride := eq (len .Params) 2 }}
|
||||
<div class="code-copy" id="{{$file | urlize}}">
|
||||
<div class="code-copy-header examplesite"><div class="action-buttons"></div><span class="filename"><i class="icon-website"></i>{{$filepath}}</span><i class="icon-{{$syntax}} input"></i></div>
|
||||
<button class="copy-button" title="Copy to clipboard" data-clipboard-snippet>
|
||||
<div class="copy-text"><i class="icon-clipboard"></i> COPY</div>
|
||||
</button>
|
||||
<pre><code class="language-{{if $syntaxoverride}}{{.Get 1}}{{else}}{{$syntax}}{{end}}">{{- readFile $file -}}</code></pre>
|
||||
<a role="button" target="_blank" href="{{$.Site.Params.ghdocsrepo}}{{$file}}" title="See {{$filepath}} source on GitHub" class="tooltip see-on-github" data-tooltip="See {{$filepath}} source on GitHub">Source<i class="icon-github"></i></a>
|
||||
</div>
|
||||
@@ -1,13 +0,0 @@
|
||||
<!-- Similar to exfile.html but *only* pulls the front matter from the example/content/*md -->
|
||||
{{ $file := .Get 0}}
|
||||
{{ $filepath := replace $file "static/" ""}}
|
||||
{{ $syntax := index (split $file ".") 1 }}
|
||||
{{ $syntaxoverride := eq (len .Params) 2 }}
|
||||
<div class="code-copy" id="{{$file | urlize}}">
|
||||
<div class="code-copy-header examplesite"><div class="action-buttons"></div><span title="" class="filename">{{$filepath}}</span><i class="icon-{{$syntax}} input"></i></div>
|
||||
<button class="copy-button" title="Copy to clipboard" data-clipboard-snippet>
|
||||
<div class="copy-text"><i class="icon-clipboard"></i> COPY</div>
|
||||
</button>
|
||||
<pre><code class="language-{{if $syntaxoverride}}{{.Get 1}}{{else}}{{$syntax}}{{end}}">{{- readFile $file -}}</code></pre>
|
||||
<a role="button" target="_blank" href="{{$.Site.Params.ghdocsrepo}}{{$file}}" title="See {{$filepath}} on GitHub" class="see-on-github">Source<i class="icon-github"></i></a>
|
||||
</div>
|
||||
@@ -1,9 +0,0 @@
|
||||
{{ 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 +0,0 @@
|
||||
<a href="{{$.Site.Params.ghrepo}}" target="_blank">GitHub repository</a>
|
||||
@@ -1 +0,0 @@
|
||||
<pre><code class="hljs nohighlight">{{ .Inner }}</code></pre>
|
||||
@@ -1,9 +0,0 @@
|
||||
{{ $_hugo_config := `{ "version": 1 }` }}
|
||||
<aside class="admonition note">
|
||||
<div class="note-icon">
|
||||
{{partial "svg/exclamation.svg" (dict "size" "20px" ) }}
|
||||
</div>
|
||||
<!-- <h2 id="{{if .Get 0}}{{.Get 0 | urlize}}{{else}}note{{end}}">{{if .Get 0}}{{.Get 0 | markdownify}}{{else}}Note{{end}}</h2> -->
|
||||
<!-- <h3>Note</h3> -->
|
||||
<div class="admonition-content">{{- .Inner -}}</div>
|
||||
</aside>
|
||||
@@ -1,9 +0,0 @@
|
||||
{{ $_hugo_config := `{ "version": 1 }` }}
|
||||
<aside class="admonition tip">
|
||||
<div class="tip-icon">
|
||||
{{partial "svg/exclamation.svg" .}}
|
||||
</div>
|
||||
<!-- <h2 id="{{if .Get 0}}{{.Get 0 | urlize}}{{else}}tip{{end}}">{{if .Get 0}}{{.Get 0 | markdownify}}{{else}}Tip{{end}}</h2> -->
|
||||
<!-- <h3>Tip</h3> -->
|
||||
<div class="admonition-content">{{- .Inner -}}</div>
|
||||
</aside>
|
||||
@@ -1,9 +0,0 @@
|
||||
{{ $_hugo_config := `{ "version": 1 }` }}
|
||||
<aside class="admonition warning">
|
||||
<div class="admonition-icon">
|
||||
{{partial "svg/exclamation.svg" .}}
|
||||
</div>
|
||||
<!-- <h2 id="{{if .Get 0}}{{.Get 0 | urlize}}{{else}}warning{{end}}">{{if .Get 0}}{{.Get 0 | markdownify}}{{else}}Warning{{end}}</h2> -->
|
||||
<!-- <h3>Warning</h3> -->
|
||||
<div class="admonition-content">{{- .Inner -}}</div>
|
||||
</aside>
|
||||
@@ -1,11 +0,0 @@
|
||||
<div class="video-wrapper" data-streaming="youtube" data-videoid="{{.Get "id"}}" >
|
||||
<i class="icon-video-play-button shortcode"></i>
|
||||
{{if (.Get "thumbnail")}}
|
||||
<div style="background-image:url(/images/thumbnails/{{.Get "thumbnail"}})" alt="YouTube Thumbnail" class="video-thumbnail"></div>
|
||||
{{else}}
|
||||
<div style="background-image:url(//img.youtube.com/vi/{{.Get "id"}}/0.jpg)" alt="YouTube Thumbnail" class="video-thumbnail"></div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{ if (.Get "description") }}
|
||||
<div class="video-description">{{ .Get "description" | markdownify }}</div>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user