-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.liquid
31 lines (29 loc) · 1.23 KB
/
index.liquid
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
---
layout: home
permalink: index.html
---
{%- capture sorted_authors -%}
{%- for author in site.authors -%}
{%- assign tls = site.translations | where_exp: "item", "item.authors contains author.slug" -%}
{{ tls | size | plus: 100000 }},{{ author.title }},{{ forloop.index0 }};
{%- endfor -%}
{%- endcapture -%}
{%- assign sorted_authors = sorted_authors | split: ';' | sort | reverse -%}
{%- assign personal_projects_table = '' -%}
{%- assign team_projects_table = '' -%}
{%- for data in sorted_authors -%}
{%- assign item = data | split: ',' -%}
{%- assign post_id = item[2] | plus: 0 -%}
{%- assign author = site.authors[post_id] -%}
{%- capture entry -%}{{ author.title }}<!--||-->{{ author.output }}<!--//-->{%- endcapture -%}
{%- unless author.team -%}
{%- assign personal_projects_table = personal_projects_table | append: entry -%}
{%- else -%}
{%- assign team_projects_table = team_projects_table | append: entry -%}
{%- endunless -%}
{%- endfor -%}
{%- capture main_table -%}
个人项目<!--||-->{% include gen_table.liquid content=personal_projects_table %}<!--//-->
团队项目<!--||-->{% include gen_table.liquid content=team_projects_table %}
{%- endcapture -%}
{%- include gen_table.liquid content=main_table -%}