diff options
author | Eddie Webb <ollitech@gmail.com> | 2021-08-16 17:33:04 +0300 |
---|---|---|
committer | Eddie Webb <ollitech@gmail.com> | 2021-08-16 17:33:04 +0300 |
commit | 76ac99dd57353e2222a7c028ac8ada3627de5478 (patch) | |
tree | 20fd601026f8976f64039d44ce4fd68293e7190e | |
parent | 27c90420210aed57d9fe8da1ab639c2330db18af (diff) |
adv blog, dont error if missing gpx
-rw-r--r-- | layouts/adv/single.html | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/layouts/adv/single.html b/layouts/adv/single.html index 1364b71..13714e8 100644 --- a/layouts/adv/single.html +++ b/layouts/adv/single.html @@ -12,9 +12,10 @@ <div> {{ with $.Page.Resources.GetMatch "map" }} {{ $image := .Resize "x400" }} - {{ $gpx := $.Page.Resources.GetMatch "gpx"}} - <a href="{{ $gpx.Permalink }}" title="Click to download gpx file" download="{{ $.Site.Title }} ADV Rides - {{ $.Page.Title }}.gpx"><img alt="Map image of this route" src="{{ $image.Permalink }}" style="padding:5px;"/></a> - {{ end }} + {{ with $.Page.Resources.GetMatch "gpx" }} + <a href="{{ .Permalink }}" title="Click to download gpx file" download="{{ $.Site.Title }} ADV Rides - {{ $.Page.Title }}.gpx"><img alt="Map image of this route" src="{{ $image.Permalink }}" style="padding:5px;"/></a> + {{ end }} + {{ end }} </div> <div> {{ $body := replace .Content .Summary "" }} |