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"
1212[extra .home ]
1313max_posts = 3
1414show_summaries = false
15+ max_summary_length = 250
1516
1617[extra .social_links ]
1718twitter = " rust_gamedev"
Original file line number Diff line number Diff line change @@ -68,3 +68,11 @@ h6:hover .anchor {
6868 padding : 8px ;
6969 border : 1px solid #e8e8e8 ;
7070}
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") }}
3131 < ul class ="post-list ">
3232 {% for post in posts.pages | slice(end=config.extra.home.max_posts) %}
3333 < 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-
3934 < h3 >
4035 < a class ="post-link " href ="{{ post.permalink }} ">
4136 {{ post.title }}
4237 </ a >
4338 </ 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 %}
4443
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 >
4749 {% endif %}
4850 </ li >
4951 {% endfor %}
You can’t perform that action at this time.
0 commit comments