File tree Expand file tree Collapse file tree 3 files changed +18
-7
lines changed Expand file tree Collapse file tree 3 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ date_format = "%F"
12
12
[extra .home ]
13
13
max_posts = 3
14
14
show_summaries = false
15
+ max_summary_length = 250
15
16
16
17
[extra .social_links ]
17
18
twitter = " rust_gamedev"
Original file line number Diff line number Diff line change @@ -68,3 +68,11 @@ h6:hover .anchor {
68
68
padding : 8px ;
69
69
border : 1px solid #e8e8e8 ;
70
70
}
71
+
72
+ .post-link {
73
+ display : inline-block ;
74
+ }
75
+
76
+ .post-list li h3 {
77
+ margin-bottom : 0 ;
78
+ }
Original file line number Diff line number Diff line change @@ -31,19 +31,21 @@ <h2 class="post-list-heading">{{ section.title | default(value="Latest News") }}
31
31
< ul class ="post-list ">
32
32
{% for post in posts.pages | slice(end=config.extra.home.max_posts) %}
33
33
< li >
34
- {% if post.date %}
35
- {% set date_format = config.extra.date_format | default(value="%b %-d, %Y") %}
36
- < span class ="post-meta "> {{ post.date | date(format=date_format) }}</ span >
37
- {% endif %}
38
-
39
34
< h3 >
40
35
< a class ="post-link " href ="{{ post.permalink }} ">
41
36
{{ post.title }}
42
37
</ a >
43
38
</ h3 >
39
+ {% if post.date %}
40
+ {% set date_format = config.extra.date_format | default(value="%b %-d, %Y") %}
41
+ < span class ="post-meta "> {{ post.date | date(format=date_format) }}</ span >
42
+ {% endif %}
44
43
45
- {% if config.extra.show_summaries %}
46
- {{ page.summary | default(value=page.content | safe | striptags | trim | truncate(length=100)) }}
44
+ {% if config.extra.home.show_summaries %}
45
+ {% set max_length = config.extra.home.max_summary_length %}
46
+ < p >
47
+ {{ post.description | default(value=post.content | safe | striptags | trim | truncate(length=max_length)) }}
48
+ </ p >
47
49
{% endif %}
48
50
</ li >
49
51
{% endfor %}
You can’t perform that action at this time.
0 commit comments