mirror of
https://github.com/distribution/distribution.git
synced 2025-09-01 23:17:33 +00:00
docs: add hugo site
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
6
docs/themes/hugo-geekdoc/layouts/partials/utils/content.html
vendored
Normal file
6
docs/themes/hugo-geekdoc/layouts/partials/utils/content.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{{ $content := .Content }}
|
||||
|
||||
{{ $content = $content | replaceRE `<nav id="TableOfContents">\s*<ul>\s*<li>\s*<ul>` `<nav id="TableOfContents"><ul>` | replaceRE `</ul>\s*</li>\s*</ul>\s*</nav>` `</ul></nav>` | safeHTML }}
|
||||
{{ $content = $content | replaceRE `(<table>(?:.|\n)+?</table>)` `<div class="table-wrap"> ${1} </div>` | safeHTML }}
|
||||
|
||||
{{ return $content }}
|
14
docs/themes/hugo-geekdoc/layouts/partials/utils/description.html
vendored
Normal file
14
docs/themes/hugo-geekdoc/layouts/partials/utils/description.html
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
{{ $isPage := or (and (ne .Type "posts") (in "section page" .Kind )) (and (eq .Type "posts") (eq .Kind "page")) }}
|
||||
{{ $description := "" }}
|
||||
|
||||
{{ if .Description }}
|
||||
{{ $description = .Description }}
|
||||
{{ else }}
|
||||
{{ if $isPage }}
|
||||
{{ $description = .Summary }}
|
||||
{{ else if .Site.Params.description }}
|
||||
{{ $description = .Site.Params.description }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ return $description }}
|
12
docs/themes/hugo-geekdoc/layouts/partials/utils/featured.html
vendored
Normal file
12
docs/themes/hugo-geekdoc/layouts/partials/utils/featured.html
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{{ $img := "" }}
|
||||
|
||||
{{ with $source := ($.Resources.ByType "image").GetMatch "{*feature*,*cover*,*thumbnail*}" }}
|
||||
{{ $featured := .Fill (printf "1200x630 %s" (default "Smart" .Params.anchor)) }}
|
||||
{{ $img = $featured.Permalink }}
|
||||
{{ else }}
|
||||
{{ with default $.Site.Params.images $.Params.images }}
|
||||
{{ $img = index . 0 | absURL }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ return $img }}
|
11
docs/themes/hugo-geekdoc/layouts/partials/utils/title.html
vendored
Normal file
11
docs/themes/hugo-geekdoc/layouts/partials/utils/title.html
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{{ $title := "" }}
|
||||
|
||||
{{ if .Title }}
|
||||
{{ $title = .Title }}
|
||||
{{ else if and .IsSection .File }}
|
||||
{{ $title = path.Base .File.Dir | humanize | title }}
|
||||
{{ else if and .IsPage .File }}
|
||||
{{ $title = .File.BaseFileName | humanize | title }}
|
||||
{{ end }}
|
||||
|
||||
{{ return $title }}
|
Reference in New Issue
Block a user