Use abs url with GetPage

This commit is contained in:
Hanzei 2018-07-21 09:53:23 +02:00
parent 452913c1fa
commit 8fbb68c6be
No known key found for this signature in database
GPG key ID: 69A2DEFD98937BA0
6 changed files with 7 additions and 7 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

View file

@ -1,5 +1,5 @@
{{ define "title" }}
<h1 class="bold-title is-1">{{ (.Site.GetPage "section" "blog").Title }}</h1>
<h1 class="bold-title is-1">{{ (.Site.GetPage "section" "/blog").Title }}</h1>
{{ end }}
{{ define "main" }}

View file

@ -9,7 +9,7 @@
</head>
<body>
<div id="top">
{{ with .Site.GetPage "page" "home" }}
{{ with .Site.GetPage "page" "/home" }}
<div class="hero is-{{ .Site.Params.home.introHeight | default "large" }}">
<!-- Super sweet Hero body title -->
<div class="hero-body">
@ -38,7 +38,7 @@
<!-- Tell them all about it! -->
{{ partial "nav.html" . }}
{{ with .Site.GetPage "page" "home" }}
{{ with .Site.GetPage "page" "/home" }}
{{ $home := . }}
{{ range sort (.Resources.ByType "page") "Params.weight" }}
{{ if ne .Name "contact.md" }}

View file

@ -9,7 +9,7 @@
<meta property="og:image" content="{{ .Permalink }}"/>
{{ end }}
{{ else }}
{{ with .Site.GetPage "page" "home" }}
{{ with .Site.GetPage "page" "/home" }}
{{ range first 5 (.Resources.ByType "image") }}
<meta property="og:image" content="{{ .Permalink }}"/>
{{ end }}

View file

@ -1,4 +1,4 @@
{{ with .Site.GetPage "section" "blog" }}
{{ with .Site.GetPage "section" "/blog" }}
<div class="section" id="{{ .Title | urlize }}">
<!-- Begin Blog container -->
<div class="container">

View file

@ -1,4 +1,4 @@
{{ with .Site.GetPage "section" "projects" }}
{{ with .Site.GetPage "section" "/projects" }}
<div class="section" id="{{ .Title | urlize }}">
<!-- Begin Projects container -->
<div class="container">
@ -8,7 +8,7 @@
<div class="section is-small">
<div class="columns is-multiline">
{{ $totalProjects := (len .Pages) }}
{{ $numberOfProjectsToShow := .Site.Params.numberOfProjectsToShow | default $totalProjects }}
{{ $numberOfProjectsToShow := .Site.Params.home.numberOfProjectsToShow | default $totalProjects }}
{{ range $index, $element := .Pages.ByWeight | first $numberOfProjectsToShow }}
{{ if eq (mod $numberOfProjectsToShow 2) 0 }}
<div class="column is-half">