Don't include drafts on the home page
This commit is contained in:
parent
56bbbc5dee
commit
34ea75029b
2 changed files with 3 additions and 3 deletions
|
@ -9,7 +9,7 @@ sources:
|
|||
tasks:
|
||||
- build: |
|
||||
cd blog
|
||||
hugo --minify --baseURL https://mzhang.io
|
||||
hugo --buildDrafts --minify --baseURL https://mzhang.io
|
||||
- upload: |
|
||||
cd blog
|
||||
echo "mzhang.io ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBzBZ+QmM4EO3Fwc1ZcvWV2IY9VF04T0H9brorGj9Udp" >> ~/.ssh/known_hosts
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
<h2 id="blog-posts-title"><a href="/posts">recent blog posts »</a></h2>
|
||||
<ul id="blog-posts">
|
||||
{{ $posts := .GetPage "/posts" }}
|
||||
{{- range first 3 $posts.Pages -}}
|
||||
{{ $posts := where (.GetPage "/posts").Pages "Draft" false }}
|
||||
{{- range first 3 $posts -}}
|
||||
<li><a href="{{ .RelPermalink }}" class="blog-post-link">
|
||||
<span class="blog-post">
|
||||
<span class="title">{{ .Title }}</span>
|
||||
|
|
Loading…
Reference in a new issue