Merge pull request #32 from 526avijitgupta/fix-leaf-bundle

Fix leaf bundle rendering for singles type
This commit is contained in:
Avijit Gupta
2021-07-20 11:20:55 +02:00
committed by GitHub
6 changed files with 23 additions and 20 deletions

View File

@@ -1,7 +1,6 @@
--- ---
title: "Projects" title: "Projects"
type: singles type: singles
slug: /projects
--- ---

View File

@@ -2,7 +2,6 @@
title: "Tatooine" title: "Tatooine"
date: 2021-05-12T23:39:49+05:30 date: 2021-05-12T23:39:49+05:30
type: singles type: singles
slug: tatooine
--- ---
### A long time ago in a galaxy far, far away.... ### A long time ago in a galaxy far, far away....

View File

@@ -1,16 +1,7 @@
{{ define "main" }} {{ define "main" }}
<div class="container list-posts"> {{ if eq .Type "singles" }}
{{- partial "single.html" . -}}
<h2 class="list-title">{{ .Name }}</h2> {{ else }}
{{- partial "list.html" . -}}
{{ range (where .Site.Pages "Params.type" "post" ).GroupByDate "2006" }}
<h2 class="posts-year">{{ .Key }}</h2>
{{- range .Pages -}}
{{- partial "list-posts.html" . -}}
{{ end }} {{ end }}
{{ end }}
</div>
{{ end }} {{ end }}

View File

@@ -3,7 +3,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="preconnect" href="https://fonts.gstatic.com"> <link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Jost&family=Arvo&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Jost:wght@400;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css"
integrity="sha512-NhSC1YmyruXifcj/KFRWoC561YpHpc5Jtzgvbuzx5VozKpWvQ+4nXhPdFgmx8xqexRcpAglTj9sIBWINXa8x5w==" integrity="sha512-NhSC1YmyruXifcj/KFRWoC561YpHpc5Jtzgvbuzx5VozKpWvQ+4nXhPdFgmx8xqexRcpAglTj9sIBWINXa8x5w=="

View File

@@ -0,0 +1,14 @@
<div class="container list-posts">
<h1 class="list-title">{{ .Name }}</h2>
{{ range (where .Site.Pages "Params.type" "post" ).GroupByDate "2006" }}
<h2 class="posts-year">{{ .Key }}</h2>
{{- range .Pages -}}
{{- partial "list-posts.html" . -}}
{{ end }}
{{ end }}
</div>