File tree Expand file tree Collapse file tree 3 files changed +50
-0
lines changed
Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,11 @@ version_menu = "Versions"
161161 [[module .imports ]]
162162 path = " github.com/hugomods/swagger-ui"
163163 disable = false
164+ [[module .mounts ]]
165+ source = ' assets'
166+ target = ' assets'
167+ source = ' static'
168+ target = ' assets'
164169
165170# added the user feedback module
166171[params .ui .feedback ]
Original file line number Diff line number Diff line change 1+ {{- $u := urls.Parse .Destination -}}
2+ {{- $src := $u.String -}}
3+ {{- if not $u.IsAbs -}}
4+ {{- $path := strings.TrimPrefix "./" $u.Path -}}
5+ {{- with or (.PageInner.Resources.Get $path) (resources.Get $path) -}}
6+ {{- $src = .RelPermalink -}}
7+ {{- with $u.RawQuery -}}
8+ {{- $src = printf "%s?%s" $src . -}}
9+ {{- end -}}
10+ {{- with $u.Fragment -}}
11+ {{- $src = printf "%s#%s" $src . -}}
12+ {{- end -}}
13+ {{- end -}}
14+ {{- end -}}
15+ < img src ="{{ $src }} " alt ="{{ .PlainText }} "
16+ {{- with .Title }} title ="{{ . }} " {{- end -}}
17+ {{- range $k, $v : = .Attributes -}}
18+ {{- if $v -}}
19+ {{- printf " %s=%q " $k ($v | transform.HTMLEscape) | safeHTMLAttr -}}
20+ {{- end -}}
21+ {{- end -}}
22+ >
23+ {{- /**/ -}}
Original file line number Diff line number Diff line change 1+ {{- $u := urls.Parse .Destination -}}
2+ {{- $href := $u.String -}}
3+ {{- if strings.HasPrefix $u.String "#" -}}
4+ {{- $href = printf "%s#%s" .PageInner.RelPermalink $u.Fragment -}}
5+ {{- else if and $href (not $u.IsAbs) -}}
6+ {{- $path := strings.TrimPrefix "./" $u.Path -}}
7+ {{- with or
8+ ($.PageInner.GetPage $path)
9+ ($.PageInner.Resources.Get $path)
10+ (resources.Get $path)
11+ -}}
12+ {{- $href = .RelPermalink -}}
13+ {{- with $u.RawQuery -}}
14+ {{- $href = printf "%s?%s" $href . -}}
15+ {{- end -}}
16+ {{- with $u.Fragment -}}
17+ {{- $href = printf "%s#%s" $href . -}}
18+ {{- end -}}
19+ {{- end -}}
20+ {{- end -}}
21+ < a href ="{{ $href }} " {{- with .Title }} title ="{{ . }} " {{- end }} > {{ .Text }}</ a >
22+ {{- /**/ -}}
You can’t perform that action at this time.
0 commit comments