Skip to content

Commit

Permalink
Use path.Join to construct hugo links (#92)
Browse files Browse the repository at this point in the history
Use path.Join so that it will render correctly on Windows
(path.Join will convert Windows backslash to forward slash)
  • Loading branch information
Summon528 authored Nov 15, 2022
1 parent 9bce284 commit c5ba5b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ And `layouts/_default/_markup/render-image.html` for images:
{{- if strings.HasSuffix $url.Path ".md" -}}
{{- relref .Page .Destination | safeURL -}}
{{- else -}}
{{- printf "/%s%s" .Page.File.Dir .Destination | safeURL -}}
{{- path.Join "/" .Page.File.Dir .Destination | safeURL -}}
{{- end -}}
{{- else -}}
{{- .Destination | safeURL -}}
Expand Down

0 comments on commit c5ba5b7

Please sign in to comment.