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:
|
tasks:
|
||||||
- build: |
|
- build: |
|
||||||
cd blog
|
cd blog
|
||||||
hugo --minify --baseURL https://mzhang.io
|
hugo --buildDrafts --minify --baseURL https://mzhang.io
|
||||||
- upload: |
|
- upload: |
|
||||||
cd blog
|
cd blog
|
||||||
echo "mzhang.io ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBzBZ+QmM4EO3Fwc1ZcvWV2IY9VF04T0H9brorGj9Udp" >> ~/.ssh/known_hosts
|
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>
|
<h2 id="blog-posts-title"><a href="/posts">recent blog posts »</a></h2>
|
||||||
<ul id="blog-posts">
|
<ul id="blog-posts">
|
||||||
{{ $posts := .GetPage "/posts" }}
|
{{ $posts := where (.GetPage "/posts").Pages "Draft" false }}
|
||||||
{{- range first 3 $posts.Pages -}}
|
{{- range first 3 $posts -}}
|
||||||
<li><a href="{{ .RelPermalink }}" class="blog-post-link">
|
<li><a href="{{ .RelPermalink }}" class="blog-post-link">
|
||||||
<span class="blog-post">
|
<span class="blog-post">
|
||||||
<span class="title">{{ .Title }}</span>
|
<span class="title">{{ .Title }}</span>
|
||||||
|
|
Loading…
Reference in a new issue