-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
106 additions
and
14 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,78 @@ | ||
<!-- _includes/project_generate_category.md | ||
event_name ..........: {{ event_name }} | ||
project_count .......: {{ project_count }} | ||
requested_category ..: {{ requested_category }} | ||
--> | ||
|
||
{% for pw_page in site.pages %} | ||
|
||
{% comment %}Extract page event name (e.g "PW39_2023_Montreal"){% endcomment %} | ||
{% assign pw_page_event_name = pw_page.path | split: '/' | first %} | ||
|
||
{% comment %}Only process page associated with the current event.{% endcomment %} | ||
{% if pw_page_event_name != event_name %} | ||
{% continue %} | ||
{% endif %} | ||
|
||
{% comment %}Extract page event type (e.g "Projects").{% endcomment %} | ||
{% assign pw_page_type = pw_page.path | split: '/' | slice: 1 | first %} | ||
|
||
{% comment %}Only process pages located in the "Projects" directory.{% endcomment %} | ||
{% if pw_page_type != "Projects" %} | ||
{% continue %} | ||
{% endif %} | ||
|
||
{% comment %}Extract page project name (e.g "SlicerVRInteraction").{% endcomment %} | ||
{% assign project_name = pw_page.path | split: '/' | slice: 2 | first | downcase %} | ||
|
||
{% comment %}Ignore "Template" and "README.md" file.{% endcomment %} | ||
{% if project_name == "template" or project_name == "readme.md" %} | ||
{% continue %} | ||
{% endif %} | ||
|
||
{% assign pw_page_category = pw_page.category | default:"Uncategorized" %} | ||
|
||
{% comment %}Force all non-matching projects to Uncategorized.{% endcomment %} | ||
{% unless page.project_categories contains pw_page_category %} | ||
{% assign pw_page_category = "Uncategorized" %} | ||
{% endunless %} | ||
|
||
{% if pw_page_category != requested_category %} | ||
{% continue %} | ||
{% endif %} | ||
|
||
{% assign project_count = project_count | plus: 1 %} | ||
|
||
{% if page.project_categories contains pw_page_category %} | ||
|
||
{% comment %}If if applies, add catergory header.{% endcomment %} | ||
{% unless categories contains pw_page_category %} | ||
{% capture categories %} | ||
{{ categories }} | ||
### {{ pw_page_category }} | ||
{% endcapture %} | ||
{% endunless %} | ||
|
||
{% comment %}Append category entry.{% endcomment %} | ||
{% capture categories %} | ||
{{ categories }} | ||
1. [{{ pw_page.project_title }}]({{ pw_page.url }}) ( | ||
{%- for investigator in pw_page.key_investigators -%} | ||
{{ investigator.name }}{% unless forloop.last %}, {% endunless -%} | ||
{%- endfor -%} | ||
) | ||
{% endcapture %} | ||
|
||
{% else %} | ||
|
||
{% capture uncategorized %} | ||
{{ uncategorized }} | ||
1. [{{ pw_page.project_title }}]({{ pw_page.url }}) ( | ||
{%- for investigator in pw_page.key_investigators -%} | ||
{{ investigator.name }}{% unless forloop.last %}, {% endunless -%} | ||
{%- endfor -%} | ||
) (Category: {{pw_page.category}}) | ||
{% endcapture %} | ||
|
||
{% endif %} | ||
{% endfor %} |
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,27 @@ | ||
<!-- Begin _includes/projects.md --> | ||
|
||
{% comment %}Extract event name (e.g "PW39_2023_Montreal"). {% endcomment %} | ||
{% assign event_name = page.path | split: '/' | first %} | ||
|
||
{% assign project_count = 0 %} | ||
{% assign categories = "" %} | ||
{% assign uncategorized = "" %} | ||
|
||
{% for requested_category in page.project_categories %} | ||
{% include project_generate_category_noloc.md %} | ||
{% endfor %} | ||
|
||
{% assign requested_category = "Uncategorized" %} | ||
{% include project_generate_category.md %} | ||
|
||
_The {{ event_name }} event has a total of {{ project_count }} projects._ | ||
|
||
{{ categories }} | ||
|
||
### Uncategorized | ||
|
||
_This section lists projects that either have no category assigned, are assigned to the "Uncategorized" category, or are assigned to a different category than the ones listed above. If you are unable to find a category that is suitable for your project, or believe that a specific category is missing, please discuss it with the [organizers](#organizers)._ | ||
|
||
{{ uncategorized }} | ||
|
||
<!-- End _includes/projects.md --> |