You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've having some issues with hugo related to the book theme currently. Working on my laptop, so I cannot verify what the issue here... So cant lookup what I could simply check on my workstation...
Error: Error building site: "/src/content/themes/hugo-book/layouts/_default/_markup/render-image.html:1:1": unmarshal failed: invalid character '{' looking for beginning of object key string
Built in 2398 ms
the mentioned file looks like the following:
{{- if .Page.Site.Params.BookPortableLinks -}}
{{- template "portable-image" . -}}
{{- else -}}
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title }}title="{{ . }}"{{ end }}/>
{{- end -}}
{{- define "portable-image" -}}
{{- $isRemote := or (in .Destination "://") (strings.HasPrefix .Destination "//") }}
{{- if not $isRemote }}
{{- $path := print .Page.File.Dir .Destination }}
{{- if strings.HasPrefix .Destination "/" }}
{{- $path = print "/static" .Destination }}
{{- end }}
{{- if not (fileExists $path) }}
{{- warnf "Image '%s' not found in '%s'" .Destination .Page.File }}
{{- end }}
{{- end }}
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title }}title="{{ . }}"{{ end }}/>
{{- end -}}
The text was updated successfully, but these errors were encountered:
I've having some issues with hugo related to the book theme currently. Working on my laptop, so I cannot verify what the issue here... So cant lookup what I could simply check on my workstation...
Error: Error building site: "/src/content/themes/hugo-book/layouts/_default/_markup/render-image.html:1:1": unmarshal failed: invalid character '{' looking for beginning of object key string
Built in 2398 ms
the mentioned file looks like the following:
{{- if .Page.Site.Params.BookPortableLinks -}}
{{- template "portable-image" . -}}
{{- else -}}
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title }}title="{{ . }}"{{ end }}/>
{{- end -}}
{{- define "portable-image" -}}
{{- $isRemote := or (in .Destination "://") (strings.HasPrefix .Destination "//") }}
{{- if not $isRemote }}
{{- $path := print .Page.File.Dir .Destination }}
{{- if strings.HasPrefix .Destination "/" }}
{{- $path = print "/static" .Destination }}
{{- end }}
{{- if not (fileExists $path) }}
{{- warnf "Image '%s' not found in '%s'" .Destination .Page.File }}
{{- end }}
{{- end }}
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title }}title="{{ . }}"{{ end }}/>
{{- end -}}
The text was updated successfully, but these errors were encountered: