Skip to content

Commit 329d113

Browse files
authored
Merge pull request #208 from cass-community/bernhold-publish-events
Publish event capability
2 parents 7aa317e + 127740c commit 329d113

File tree

9 files changed

+107
-36
lines changed

9 files changed

+107
-36
lines changed

.github/workflows/jekyll.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ on:
1414
# Allows you to run this workflow manually from the Actions tab
1515
workflow_dispatch:
1616

17+
# Rebuild daily so events get updated (upcoming --> past)
18+
# Do it just after midnight AOE so the results are correct regardless
19+
# of where the event takes place. For US events, this puts the update
20+
# in the 4am-7am time frame, which is still okay. European and asian
21+
# events have it a little worse. But I think there is minimal harm, overall.
22+
schedule:
23+
# * is a special character in YAML so you have to quote this string
24+
# m h d M w
25+
- cron: '1 12 * * *' # 12:01 pm UTC = 12:01am AOE
26+
1727
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1828
permissions:
1929
contents: read

_data/navigation.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ main:
55
- title: "Software"
66
description: "Software Products"
77
url: /software/
8-
# - title: Events
9-
# description: "Events organized by CASS"
10-
# url: /events/
8+
- title: Events
9+
description: "Events organized by CASS"
10+
url: /events/
1111
- title: "News"
1212
description: "Updates from CASS and its members"
1313
url: /news/

_events/test-event.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# published: false
2+
published: false
33
startdate: "2024-03-20"
44
enddate: "2026-04-19"
55
time: "1:00 pm - 2:00 pm EDT" # Ensure that time zone is correct with respect to standard/daylight time

_includes/breaking-news-notice.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{% assign news_sort_by = include.sort_by | default: 'date' %}
1313
{% assign news_sort_order = include.sort_order | default: 'reverse' %}
1414
{% assign news_layout = include.entries_layout | default: 'list' %}
15-
{% assign news_class = include.class | default: 'notice notice--primary' %}
15+
{% assign news_class = include.class | default: 'notice notice--info' %}
1616
{% assign news_look_back = include.look_back | default: 30 %}
1717

1818
{% capture news_icon %}{% include icon-map-lookup label="News" %}{% endcapture %}

_includes/ev-archive-single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h3 style="margin-top: 0.5em"><small>{{ event_y }}</small><br>
4949
<p class="page__meta">{{ post.type }}</p>
5050
{% endif %}
5151

52-
<h3 class="archive__item-title no_toc" itemprop="headline" style="margin-top: 0.25em">
52+
<h3 class="archive__item-title no_toc" itemprop="headline" style="overflow: visible; margin-top: 0.25em">
5353
{% if post.link %}
5454
<a href="{{ post.link }}">{{ title }}</a> <a href="{{ post.url | relative_url }}" rel="permalink"><i class="fas fa-link" aria-hidden="true" title="permalink"></i><span class="sr-only">Permalink</span></a>
5555
{% else %}

_includes/ev-documents-collection.html

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -41,38 +41,19 @@
4141
{% assign entries = enddate | concat: noenddate %}
4242
{% endif %}
4343

44-
{% if include.sort_by %}
45-
{% assign entries = entries | sort: include.sort_by %}
46-
{% endif %}
47-
48-
{% if include.sort_order == 'reverse' %}
49-
{% assign entries = entries | reverse %}
50-
{% endif %}
44+
{% comment %}
45+
If the input and/or filtering leave the list of entries empty
46+
the sorting process will fail. So instead we just issue a message.
47+
{% endcomment %}
5148

5249
{% if entries != nil and entries.size > 0 %}
53-
{%- for post in entries limit: limit -%}
54-
{% include ev-archive-single.html type=include.type %}
55-
{%- endfor -%}
56-
{% assign remaining = entries.size | minus: limit %}
57-
{% if remaining > 0 %}
58-
<div style="display: flex">
59-
{% comment %}
60-
Position the message where event titles are displayed.
61-
The widith of the empty <div> should match that in
62-
ev-archive-single.html
63-
{% endcomment %}
64-
{% if include.more_url %}
65-
{% capture message %}<a href='{{ include.more_url }}'>see {{remaining }} more {{ remaining | pluralize: "event", "events" }}</a>{% endcapture %}
66-
{% else %}
67-
{% capture message %}plus {{remaining }} more {{ remaining | pluralize: "event", "events" }} not shown{% endcapture %}
68-
{% endif %}
69-
<div style="width: 15%">
70-
</div>
71-
<div>
72-
<p><em>{{ message }}</em></p>
73-
</div>
74-
</div>
75-
{% endif %}
50+
{% if include.sort_by %}
51+
{% assign entries = entries | sort: include.sort_by %}
52+
{% endif %}
53+
54+
{% if include.sort_order == 'reverse' %}
55+
{% assign entries = entries | reverse %}
56+
{% endif %}
7657
{% else %}
7758
<div style="display: flex">
7859
{% comment %}
@@ -86,4 +67,28 @@
8667
<p><em>no events found</em></p>
8768
</div>
8869
</div>
70+
{% endif %}
71+
72+
{%- for post in entries limit: limit -%}
73+
{% include ev-archive-single.html type=include.type %}
74+
{%- endfor -%}
75+
{% assign remaining = entries.size | minus: limit %}
76+
{% if remaining > 0 %}
77+
<div style="display: flex">
78+
{% comment %}
79+
Position the message where event titles are displayed.
80+
The widith of the empty <div> should match that in
81+
ev-archive-single.html
82+
{% endcomment %}
83+
{% if include.more_url %}
84+
{% capture message %}<a href='{{ include.more_url }}'>see {{remaining }} more {{ remaining | pluralize: "event", "events" }}</a>{% endcapture %}
85+
{% else %}
86+
{% capture message %}plus {{remaining }} more {{ remaining | pluralize: "event", "events" }} not shown{% endcapture %}
87+
{% endif %}
88+
<div style="width: 15%">
89+
</div>
90+
<div>
91+
<p><em>{{ message }}</em></p>
92+
</div>
93+
</div>
8994
{% endif %}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{% comment %}
2+
upcoming-events-notice.html
3+
4+
Displays a number of upcoming events in a notice box. If there are no events that fit the parameters, nothing is displayed.
5+
6+
Parameters
7+
limit: The maximum number of events to be displayed (Default: 3)
8+
9+
{% endcomment %}
10+
11+
{% assign event_collection = include.collection | default: 'events' %}
12+
{% assign event_sort_by = include.sort_by | default: 'startdate' %}
13+
{% assign event_sort_order = include.sort_order | default: 'forward' %}
14+
{% assign event_layout = include.entries_layout | default: 'list' %}
15+
{% assign event_class = include.class | default: 'notice notice--primary' %}
16+
17+
{% capture event_icon %}{% include icon-map-lookup label="Meetings" %}{% endcapture %}
18+
19+
{% assign today = site.time | date:"%Y-%m-%d" %}
20+
21+
{% assign entries = include.entries | default: site[event_collection] | where_exp: "post", "post.hidden != true" %}
22+
{% assign limit = include.limit | default: 3 %}
23+
24+
{% comment %}
25+
Trim events to cutoff
26+
{% endcomment %}
27+
{% assign enddate = entries | where_exp: "item", "item.enddate != nil" | where_exp: "item", "item.enddate >= today" %}
28+
{% assign noenddate = entries | where_exp: "item", "item.enddate == nil" | where_exp: "item", "item.startdate >= today" %}
29+
{% assign entries = enddate | concat: noenddate %}
30+
31+
{% if entries.size != 0 %}
32+
<div class="{{ event_class }}">
33+
<h2 style="margin-top: 0">Upcoming events</h2>
34+
35+
<div class="entries-{{ event_layout }}">
36+
{% include ev-documents-collection.html entries=entries sort_by=event_sort_by sort_order=event_sort_order type=entries_layout limit=event_limit cutoff=today %}
37+
</div>
38+
39+
<p style="margin-top: 1em"><strong>{{ event_icon }} See all <a href="{{ "/events/" | relative_url }}">CASS events...</a></strong></p>
40+
</div>
41+
{% endif %}

_news/2026-02-10-cass-bof-days.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: "Register now for CASS BoF Days, coming February 10-12, 2026"
3+
last_modified_at: 2026-01-06
4+
published: false
5+
---
6+
CASS BoF Days provides opportunities for to bring communities together for Birds-of-a-Feather (BoF) sessions around topics of interest. Participation is free and open to the public, however, registration is required for each event. Follow the links below for details.
7+
8+
{% assign today = site.time | date:"%Y-%m-%d" %}
9+
10+
{% assign entries = site.events | where: "series", "CASS BoF Days" | where_exp: "item", "item.startdate contains '2024'" %}
11+
12+
<div class="entries-list">
13+
{% include ev-documents-collection.html entries=entries sort_by="startdate" sort_order="forward" type="list" %}
14+
</div>

index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ header:
1818
{% capture meetings_icon %}{% include icon-map-lookup label="Meetings" %}{% endcapture %}
1919

2020
{% include breaking-news-notice.html %}
21+
{% include upcoming-events-notice.html %}
2122

2223
The **Consortium for the Advancement of Scientific Software (CASS)** is committed to the stewardship and advancement of the current and future ecosystem of scientific computing software in support of competitiveness and innovation through the advancement of science. These stories illustrate some of the impacts of software in the CASS portfolio.
2324

0 commit comments

Comments
 (0)