-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: author and multi author support
fix #83
- Loading branch information
1 parent
3ad8e0f
commit 6d159c8
Showing
13 changed files
with
398 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% if content.authors %} | ||
<div class="content-authors"> | ||
<ul> | ||
{% for username in content.authors %} | ||
{% set author = site.authors[username] %} | ||
<li> | ||
<a href="author-{{username}}.html"> | ||
<img src="{{ author.avatar }}" alt="{{ author.name }}" class="avatar"> | ||
{{ author.name }} | ||
</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{# Calculate reading time #} | ||
{% set words = content.html | striptags | split(pat=' ') | length %} | ||
{% set reading_time = (words / 200) | round(method='ceil') %} | ||
<span class="content-date"> | ||
<small>{% if content.date %} {{ content.date | default_date_format }} {% endif %} - {{ reading_time }} minute{% if reading_time > 1 %}s{% endif %}</small> | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{# Display title and date if not starting with h1, else render the content using the user given title #} | ||
|
||
{% if content.html is not starting_with("<h1>") %} | ||
<div class="content-title"> | ||
<h1>{{content.title}}</h1> | ||
{% include "content_date.html" ignore missing %} | ||
</div> | ||
{% endif %} |
Oops, something went wrong.