Skip to content

Commit

Permalink
Merge pull request #495 from lehors/guest-posts
Browse files Browse the repository at this point in the history
Add label to guest blog posts
  • Loading branch information
MarkLodato authored Oct 14, 2022
2 parents 19012fc + 004f641 commit af01101
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/_layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
layout: post-list
is_post: true
---
<p class="h3 post-author">by {{ page.author }}</p>

<p class="h3 post-author">{% if page.is_guest_post -%}Guest post{%- endif %} by {{ page.author }}</p>

<p class="post-date"><time datetime="{{ page.date | date: "%Y-%m-%d" }}">{{ page.date | date_to_string }}</time></p>

{{ content }}
Expand Down
4 changes: 2 additions & 2 deletions docs/blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
{% for post in site.posts %}
<li class="mb-8">
<h2 class="h2 mb-6"><a href="{{ post.url }}">{{ post.title }}</a></h2>
<p><b>posted by {{ post.author }} on {{ post.date | date_to_string }}</b></p>
<p><b>{% if post.is_guest_post -%}Guest post{%- endif %} by {{ post.author }} on {{ post.date | date_to_string }}</b></p>
{% if post.subtitle %}
{{ post.subtitle }}
{% endif %}
{{ post.excerpt }}
</li>
{% endfor %}
</ul>
</ul>

0 comments on commit af01101

Please sign in to comment.