mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-22 03:42:53 +00:00
Use abs url with GetPage
This commit is contained in:
parent
452913c1fa
commit
8fbb68c6be
6 changed files with 7 additions and 7 deletions
Binary file not shown.
Before Width: | Height: | Size: 58 KiB |
|
@ -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" }}
|
||||
|
|
|
@ -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" }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in a new issue