-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauthors.html
More file actions
96 lines (89 loc) · 3.05 KB
/
authors.html
File metadata and controls
96 lines (89 loc) · 3.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
layout: base
title: Authors
permalink: /authors/
---
<!-- {% assign strAuList = '' %}
{% for post in site.posts %}
{% if post.author %}
{% assign page_author_list = post.author | split: " and " %}
{% for author in page_author_list %}
{% if strAuList contains author %}
{% assign strAuList = strAuList %}
{% else %}
{% assign strAuList = strAuList | append: '&' | append: author %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor%}
{% assign AuList = strAuList | remove_first: '&' | split: '&' | sort %}
{% assign initial_str = '' %}
{% for author in AuList %}
{% assign initial = author | slice: 0 | capitalize %}
{% if initial_str contains initial %}
{% assign initial_str = initial_str %}
{% else %}
{% assign initial_str = initial_str | append: '&' | append: initial %}
{% endif %}
{% endfor %}
{% assign initList = initial_str| remove_first: '&' | split: '&' | sort %}
<div class="home">
{%- if page.title -%}
<h1 class="page-heading">{{ page.title }}</h1>
{%- endif -%}
<div>
{% for initial in initList %}
<a href="#{{ initial | slugify }}" class="post-tag">{{ initial }}</a>
   
{% endfor %}
</div>
<hr class="brand"/>
<div>
{% for initial in initList %}
<p><h4 id="{{ initial | slugify }}">{{ initial }}</h4></p>
<ul class="post-meta-ul">
{% for author in AuList %}
{% assign author_cleaned = author | replace: ', ', '-' %}
{% assign author_initial = author | slice: 0 | capitalize %}
{% if author_initial == initial %}
<li><a href="{{ site.baseurl }}/authors/author/{{ author_cleaned | slugify }}">{{ author }}</a></li>
{% endif %}
{% endfor %}
</ul>
{% endfor %}
</div>
</div> -->
{% assign initial_str = '' %}
{% for author in site.authors %}
{% assign initial = author.author | slice: 0 | capitalize %}
{% if initial_str contains initial %}
{% assign initial_str = initial_str %}
{% else %}
{% assign initial_str = initial_str | append: '&' | append: initial %}
{% endif %}
{% endfor %}
<div class="home">
{%- if page.title -%}
<h1 class="page-heading">{{ page.title }}</h1>
{%- endif -%}
<div>
{% for initial in initList %}
<a href="#{{ initial | slugify }}" class="post-tag">{{ initial }}</a>
   
{% endfor %}
</div>
<hr class="brand"/>
<div>
{% for initial in initList %}
<p><h4 id="{{ initial | slugify }}">{{ initial }}</h4></p>
<ul class="post-meta-ul">
{% for author in site.authors %}
{% assign author_initial = author.author | slice: 0 | capitalize %}
{% if author_initial == initial %}
<li><a href="{{ site.baseurl }}/{{ author.url }}">{{ author.author }}</a></li>
{% endif %}
{% endfor %}
</ul>
{% endfor %}
</div>
</div>