|
50 | 50 | {% assign author_array_limit = site.max_author_limit %}
|
51 | 51 | {% endif %}
|
52 | 52 |
|
53 |
| - {% for author in entry.author_array limit: author_array_limit %} |
| 53 | + {%- for author in entry.author_array limit: author_array_limit -%} |
54 | 54 | {% assign author_is_self = false %}
|
55 |
| - {% assign author_last_name = author.last | remove: '¶' | remove: '&' | remove: '*' | remove: '†' | remove: '^' %} |
| 55 | + {%- assign author_last_name = author.last | remove: '¶' | remove: '&' | remove: '*' | remove: '†' | remove: '^' -%} |
56 | 56 | {% if site.scholar.last_name contains author_last_name %}
|
57 | 57 | {% if site.scholar.first_name contains author.first %}
|
58 | 58 | {% assign author_is_self = true %}
|
59 | 59 | {% endif %}
|
60 |
| - {% endif %} |
| 60 | + {%- endif -%} |
61 | 61 | {% assign coauthor_url = null %}
|
62 |
| - {% assign clean_last_name = author_last_name | downcase | remove_accents %} |
| 62 | + {%- assign clean_last_name = author_last_name | downcase | remove_accents -%} |
63 | 63 | {% if site.data.coauthors[clean_last_name] %}
|
64 |
| - {% for coauthor in site.data.coauthors[clean_last_name] %} |
| 64 | + {%- for coauthor in site.data.coauthors[clean_last_name] -%} |
65 | 65 | {% if coauthor.firstname contains author.first %}
|
66 |
| - {% assign coauthor_url = coauthor.url %} |
| 66 | + {%- assign coauthor_url = coauthor.url -%} |
67 | 67 | {% break %}
|
68 | 68 | {% endif %}
|
69 | 69 | {% endfor %}
|
70 |
| - {% endif %} |
| 70 | + {%- endif -%} |
71 | 71 |
|
72 |
| - {% if forloop.length > 1 %} |
| 72 | + {%- if forloop.length > 1 -%} |
73 | 73 | {% if forloop.first == false %}, {% endif %}
|
74 |
| - {% if forloop.last and author_array_limit == author_array_size %}and {% endif %} |
| 74 | + {%- if forloop.last and author_array_limit == author_array_size %}and {% endif -%} |
75 | 75 | {% endif %}
|
76 |
| - {% if author_is_self %} |
| 76 | + {%- if author_is_self -%} |
77 | 77 | <em>
|
78 | 78 | {{- author.first }}
|
79 | 79 | {{ author.last -}}
|
80 | 80 | </em>
|
81 |
| - {% else %} |
82 |
| - {% if coauthor_url %} |
| 81 | + {%- else -%} |
| 82 | + {%- if coauthor_url -%} |
83 | 83 | <a href="{{coauthor_url}}">
|
84 | 84 | {{- author.first }}
|
85 | 85 | {{ author.last -}}
|
86 | 86 | </a>
|
87 |
| - {% else %} |
| 87 | + {%- else -%} |
88 | 88 | {{ author.first }}
|
89 | 89 | {{ author.last }}
|
90 | 90 | {% endif %}
|
91 |
| - {% endif %} |
| 91 | + {%- endif -%} |
92 | 92 | {% endfor %}
|
93 |
| - {% assign more_authors = author_array_size | minus: author_array_limit %} |
| 93 | + {%- assign more_authors = author_array_size | minus: author_array_limit -%} |
94 | 94 |
|
95 |
| - {% assign more_authors_hide = more_authors | append: ' more author' %} |
| 95 | + {%- assign more_authors_hide = more_authors | append: ' more author' -%} |
96 | 96 | {% if more_authors > 0 %}
|
97 |
| - {% if more_authors > 1 %} |
| 97 | + {%- if more_authors > 1 -%} |
98 | 98 | {% assign more_authors_hide = more_authors_hide | append: 's' %}
|
99 |
| - {% endif %} |
| 99 | + {%- endif -%} |
100 | 100 | {% assign more_authors_show = '' %}
|
101 |
| - {% for author in entry.author_array offset: author_array_limit %} |
| 101 | + {%- for author in entry.author_array offset: author_array_limit -%} |
102 | 102 | {% assign more_authors_show = more_authors_show | append: author.first | append: ' ' | append: author.last %}
|
103 | 103 | {% unless forloop.last %}
|
104 | 104 | {% assign more_authors_show = more_authors_show | append: ', ' %}
|
105 | 105 | {% endunless %}
|
106 |
| - {% endfor %} |
| 106 | + {%- endfor -%} |
107 | 107 | , and
|
108 | 108 | <span
|
109 | 109 | class="more-authors"
|
|
0 commit comments