Skip to content

Commit

Permalink
Make Hero image work out-of-the box (#40)
Browse files Browse the repository at this point in the history
* using Hero sample image in the theme's /static folder
* fall back to site config
* fall back to hard coded default if none set in page or site params
  • Loading branch information
bep authored and Bud Parr committed Jul 23, 2017
1 parent 68aae32 commit 7b5196a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file not shown.
2 changes: 1 addition & 1 deletion layouts/partials/site-header.html
@@ -1,4 +1,4 @@
{{ $featured_image := .Params.featured_image }}
{{ $featured_image := .Param "featured_image" | default "images/gohugo-default-sample-hero-image.jpg" }}
{{ if $featured_image }}
{{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}}
{{ $featured_image := (trim $featured_image "/") | absURL }}
Expand Down

0 comments on commit 7b5196a

Please sign in to comment.