1
Fork 0

Use resource for header image

This commit is contained in:
Jake Howard 2018-08-15 21:24:59 +01:00
parent d5b7022469
commit 4202350038
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 3 additions and 2 deletions

View file

@ -1,5 +1,4 @@
---
title: Homepage
image: /img/header.jpg
---
Part Developer. Part SysAdmin. Part Hacker. All Nerd!

View file

@ -1,5 +1,7 @@
{{ define "main" }}
<header id="index-header" class="d-flex align-items-center image" data-image="{{ .Params.image }}">
{{ $header_image := resources.Get "img/header.jpg" | fingerprint }}
<header id="index-header" class="d-flex align-items-center image" data-image="{{ $header_image.RelPermalink }}">
<div class="text-center m-auto text-light">
<h1 class="display-1">{{ .Site.Params.author_name }}</h1>
<h2 class="lead">{{ .Content }}</h2>