Skip to content

Commit

Permalink
Merge pull request #359 from kakawait/bugfix/cover-image-with-url
Browse files Browse the repository at this point in the history
Remove stupid previous cover Image fix
  • Loading branch information
kakawait authored Jul 10, 2019
2 parents e5961f1 + 9dd6c3e commit b2a014f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ canonifyurls = true
# There is many free CDN like Cloudinary or you can also use indirectly
# by using services like Google Photos.
# Current image is on AWS S3 and delivered by AWS CloudFront.
# Otherwise put your image in folder `static/_images/` (development) or in `source/assets/images/` if you can't or don't want to build the theme,
# and use relative url : `your-image.png`
# Otherwise put your image, for example `cover.jpg` in folder `static/images/`,
# and use relative url : `images/cover.jpg`
coverImage = "images/cover.jpg"

# Display an image gallery at the end of a post which have photos variables (false: disabled, true: enabled)
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/post/header-cover.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="post-header-cover
{{ if .Params.metaalignment }}text-{{ .Params.metaalignment }}{{ else }}text-left{{ end }}
{{ with .Params.coversize }}post-header-cover--{{ . }}{{ end }}"
style="background-image:url('/{{ strings.TrimPrefix "/" .Params.coverimage }}')"
style="background-image:url('{{ .Params.coverimage | relURL }}')"
data-behavior="{{ $.Scratch.Get "sidebarBehavior" }}">
{{ if or (eq .Params.covermeta "in") (not .Params.covermeta) }}
{{ partial "post/header.html" . }}
Expand Down

0 comments on commit b2a014f

Please sign in to comment.