add latest post to the home page and add tags to post-preview.html
la-ninpre leobrekalini@gmail.com
Sun, 23 May 2021 19:55:39 +0300
2 files changed,
30 insertions(+),
19 deletions(-)
M
_includes/post-preview.html
→
_includes/post-preview.html
@@ -6,5 +6,10 @@ {{ post.excerpt }}
<p> <a href="{{ post.url }}">read more...</a> </p> - <small><p>{{ post.date | date_to_string }}</p></small> + <small> + <p>{{ post.date | date_to_string }} | + {% for tag in post.tags %}<a href="/tags/{{tag}}">{{tag}} </a> + {% endfor %} + </p> + </small> </div>
M
_layouts/about-page.html
→
_layouts/about-page.html
@@ -4,27 +4,33 @@ ---
<div class="about"> <div class="about-sidebar"> - <img id="avatar" alt="aaoth-photo" src="/assets/img/aaoth-photo.jpeg"> - <div class="about-links"> - <p>other links:</p> - <ul> - {% assign sorted_links = site.data.links | sort: "type" %} - {% for link in sorted_links %} - <li> - <a href="{{ link.link }}"> - <img - class= "link-icon" - alt="{{ link.type }}" - src="/assets/img/{{ link.type }}-icon.png"> - <div class="link-text">{{ link.name }}</div> - </a> - </li> - {% endfor %} - </ul> - </div> + <img id="avatar" alt="aaoth-photo" src="/assets/img/aaoth-photo.jpeg"> + <div class="about-links"> + <p>other links:</p> + <ul> + {% assign sorted_links = site.data.links | sort: "type" %} + {% for link in sorted_links %} + <li> + <a href="{{ link.link }}"> + <img + class= "link-icon" + alt="{{ link.type }}" + src="/assets/img/{{ link.type }}-icon.png"> + <div class="link-text">{{ link.name }}</div> + </a> + </li> + {% endfor %} + </ul> + </div> </div> <div class="about-info"> {{ content }} + <div class="latest-post"> + <h2>latest post</h2> + {% assign post = site.posts[0] %} + {% include post-preview.html %} + </div> </div> </div> +