Skip to content

Commit cb6dd7a

Browse files
radikahlradikahl
radikahl
authored and
radikahl
committed
Added hide-title YAML parameter
Allows to hide the title from a post.
1 parent 7beb5b9 commit cb6dd7a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ defaults:
8585
values:
8686
layout: "post"
8787
comments: true # add comments to all blog posts
88+
hide-title: false
8889
-
8990
scope:
9091
path: "" # all files

index.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
{% for post in paginator.posts %}
99
<article class="post-preview">
1010
<a href="{{ post.url | prepend: site.baseurl }}">
11+
{% if post.hide-title == false %}
1112
<h2 class="post-title">{{ post.title }}</h2>
12-
13+
{% endif %}
1314
{% if post.subtitle %}
1415
<h3 class="post-subtitle">
1516
{{ post.subtitle }}

0 commit comments

Comments
 (0)