File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- <!-- Provides unofficial GitHub card function for author_card variable -->
1+ <!-- Provides unofficial GitHub card function for include.author variable -->
22
3- {% assign authors = author_card %}
4- {% for author in authors %}
5- {% assign author_no_at_sign = author | strip_html | remove_first: "@" %}
6- {% assign at_sign = author | strip_html | replace: author_no_at_sign %}
7- <!-- first function does not work and truncate function returns trailing "..." -->
8- {% assign test_at_sign_is_first = author | truncate: 4 | replace: "@" | size %}
9- <!-- this looks weird, but it was the only way I could figure out how to test
10- that the first character of author is "@" -->
11- {% if at_sign.size > 0 and test_at_sign_is_first == 3 %}
12- < div data-card-user ="{{author_no_at_sign}} "> </ div > < br />
13- {% else %}
14- < div class ="user-card "> < div class ="user-card-name "> {{ author }}</ div > </ div >
15- {% endif %}
16- {% endfor %}
3+ {% assign author_no_at_sign = include.author | strip_html | remove_first: "@" %}
4+ {% assign at_sign = include.author | strip_html | replace: author_no_at_sign %}
5+ <!-- first function does not work and truncate function returns trailing "..." -->
6+ {% assign test_at_sign_is_first = include.author | truncate: 4 | replace: "@" | size %}
7+ <!-- this looks weird, but it was the only way I could figure out how to test
8+ that the first character of include.author is "@" -->
9+ {% if at_sign.size > 0 and test_at_sign_is_first == 3 %}
10+ < div data-card-user ="{{author_no_at_sign}} "> </ div > < br />
11+ {% else %}
12+ < div class ="user-card "> < div class ="user-card-name "> {{ include.author }}</ div > </ div >
13+ {% endif %}
Original file line number Diff line number Diff line change @@ -26,8 +26,9 @@ <h3 class="panel-title">Post Info</h3>
2626 </ li >
2727 {% if page.author %}
2828 < li class ="list-group-item ">
29- {% assign author_card = page.author %}
30- {% include author-card.html %}
29+ {% for author in page.author %}
30+ {% include author-card.html author=author %}
31+ {% endfor %}
3132 </ li >
3233 {% endif %}
3334 </ ul >
Original file line number Diff line number Diff line change @@ -34,8 +34,9 @@ <h3 class="panel-title">Project Info</h3>
3434 {% endif %}
3535 {% if page.author %}
3636 < li class ="list-group-item ">
37- {% assign author_card = page.author %}
38- {% include author-card.html %}
37+ {% for author in page.author %}
38+ {% include author-card.html author = author %}
39+ {% endfor %}
3940 </ li >
4041 {% endif %}
4142 </ ul >
Original file line number Diff line number Diff line change 1818
1919{{ content }}
2020
21- {% if page.author_cards %}
22- {% if author_cards.length > 1 %}
21+ {% if page.author %}
22+ {% assign count = page.author | size %}
23+ {% if count > 1 %}
2324< h2 > Authors </ h2 >
2425{% else %}
2526< h2 > Author </ h2 >
2627{% endif %}
27- {% for author in page.author_cards %}
28- < div class =" github-card " data-user =" {{ author }} " > </ div >
28+ {% for author in page.author %}
29+ < div style =" float: left; margin-right: 20px; " > {% include author-card.html author = author %} </ div >
2930{% endfor %}
30- < script src ="//cdn.jsdelivr.net/github-cards/latest/widget.js "> </ script >
3131{% endif %}
Original file line number Diff line number Diff line change 11---
22title : Setting Up a Python Development Environment with PyCharm
33subject : Software - Python
4- author_cards : { antonvh}
4+ author : " @ antonvh"
55---
66
77* Table of Contents
You can’t perform that action at this time.
0 commit comments