jekyll-theme-conference 4.1.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +204 -150
  3. data/UPGRADE_GUIDE.md +140 -21
  4. data/_data/conference_assets.yml +1 -1
  5. data/_data/lang.yml +9 -1
  6. data/_includes/checks.html +121 -29
  7. data/_includes/conference_config.json +11 -6
  8. data/_includes/footer.html +1 -1
  9. data/_includes/get_edition.html +85 -0
  10. data/_includes/get_link.html +7 -6
  11. data/_includes/get_link_tag_streaming.html +3 -3
  12. data/_includes/get_live_timestamps.html +5 -5
  13. data/_includes/get_location_config.html +5 -0
  14. data/_includes/get_menu.html +30 -0
  15. data/_includes/get_overview_url.html +18 -0
  16. data/_includes/get_page_description.html +4 -4
  17. data/_includes/get_program_config.html +34 -21
  18. data/_includes/get_room_live_href.html +1 -1
  19. data/_includes/get_schema_event.html +28 -0
  20. data/_includes/get_start_times.html +1 -1
  21. data/_includes/get_tag_icon.html +1 -1
  22. data/_includes/get_talk_overview_talk.html +4 -4
  23. data/_includes/get_time_pronoun.html +1 -1
  24. data/_includes/get_track_properties.html +1 -1
  25. data/_includes/header.html +5 -3
  26. data/_includes/hidden_page.html +7 -5
  27. data/_includes/infobox.html +11 -8
  28. data/_includes/list_header_meta.html +9 -9
  29. data/_includes/list_header_pwa.html +1 -1
  30. data/_includes/list_speakers.html +1 -1
  31. data/_includes/modal_live.html +4 -4
  32. data/_includes/navbar.html +41 -22
  33. data/_includes/navbar_pwa.html +13 -12
  34. data/_includes/navbar_rooms.html +2 -2
  35. data/_includes/schema_conference.html +26 -48
  36. data/_includes/schema_location.html +3 -3
  37. data/_includes/schema_room.html +1 -1
  38. data/_includes/schema_speaker.html +3 -3
  39. data/_includes/schema_talk.html +9 -21
  40. data/_includes/show_live_icon.html +1 -1
  41. data/_includes/show_menu_items.html +19 -0
  42. data/_includes/show_talk_info.html +3 -3
  43. data/_includes/show_talk_time.html +3 -3
  44. data/_layouts/editions.html +20 -0
  45. data/_layouts/home.html +11 -14
  46. data/_layouts/htaccess.html +19 -0
  47. data/_layouts/json-data.html +7 -6
  48. data/_layouts/json-site.html +11 -1
  49. data/_layouts/location.html +5 -3
  50. data/_layouts/manifest.html +6 -5
  51. data/_layouts/program.html +9 -8
  52. data/_layouts/room.html +3 -2
  53. data/_layouts/speaker-overview.html +1 -1
  54. data/_layouts/speaker.html +7 -4
  55. data/_layouts/stream-overview.html +2 -2
  56. data/_layouts/sw.js +14 -2
  57. data/_layouts/talk-overview.html +4 -4
  58. data/_layouts/talk.html +5 -2
  59. data/assets/js/conference.bundle.js +1 -1
  60. metadata +8 -1
@@ -4,7 +4,9 @@
4
4
  Documents (/documents/), source maps, .woff fonts with a .woff2 twin and
5
5
  the icon font (icons are inline SVGs) are skipped. Theme bundles carry
6
6
  their content hash (?v=), so an unchanged bundle is not downloaded again.
7
+ Of several editions, only the current one is precached.
7
8
  {%- endcomment -%}
9
+ {%- include get_edition.html -%}
8
10
  {%- assign pages = "" | split: "" -%}
9
11
  {%- assign assets = "" | split: "" -%}
10
12
  {%- assign asset_versions = site.data.conference_assets -%}
@@ -23,6 +25,10 @@
23
25
  {%- if page.output == false or page.url == nil or page.url == "" or page.url == "/sw.js" or page_ext == "map" -%}
24
26
  {%- continue -%}
25
27
  {%- endif -%}
28
+ {%- assign page_edition = page.edition | append: "" -%}
29
+ {%- if page.edition and page_edition != edition_current_id -%}
30
+ {%- continue -%}
31
+ {%- endif -%}
26
32
  {%- assign url = page.url | prepend: site.baseurl -%}
27
33
  {%- if page.url contains "/assets/" -%}
28
34
  {%- assign assets = assets | push: url -%}
@@ -36,6 +42,10 @@
36
42
  {%- continue -%}
37
43
  {%- endunless -%}
38
44
  {%- for item in collection.docs -%}
45
+ {%- assign item_edition = item.edition | append: "" -%}
46
+ {%- if item.edition and item_edition != edition_current_id -%}
47
+ {%- continue -%}
48
+ {%- endif -%}
39
49
  {%- unless item.hide or item.output == false -%}
40
50
  {%- assign url = item.url | prepend: site.baseurl -%}
41
51
  {%- assign pages = pages | push: url -%}
@@ -64,7 +74,7 @@
64
74
  {%- assign assets = assets | push: url -%}
65
75
  {%- endfor -%}
66
76
  {
67
- "name": {{ site.title | jsonify }},
77
+ "name": {{ edition_title | jsonify }},
68
78
  "baseurl": {{ site.baseurl | jsonify }},
69
79
  "pages": {{ pages | uniq | jsonify }},
70
80
  "assets": {{ assets | uniq | jsonify }}
@@ -1,3 +1,4 @@
1
+ {%- unless page.hide -%}
1
2
  {% include header.html %}
2
3
 
3
4
  {% assign this_room = page %}
@@ -10,9 +11,7 @@
10
11
  {% endif %}
11
12
  </h1>
12
13
 
13
- {% unless page.hide %}
14
- {% include navbar_rooms.html %}
15
- {% endunless %}
14
+ {% include navbar_rooms.html %}
16
15
 
17
16
  {% if page.postal_address %}
18
17
  <address>
@@ -58,3 +57,6 @@
58
57
  {% endif %}
59
58
 
60
59
  {% include footer.html %}
60
+ {%- else -%}
61
+ {%- include hidden_page.html -%}
62
+ {%- endunless -%}
@@ -1,10 +1,11 @@
1
+ {%- include get_edition.html -%}
1
2
  {%- if site.conference.pwa and site.conference.pwa.enable -%}
2
3
  {
3
- "name": {{ site.title | jsonify }},
4
- "short_name": {{ site.title | jsonify }},
5
- "description": {{ site.description | jsonify }},
4
+ "name": {{ edition_title | jsonify }},
5
+ "short_name": {{ edition_title | jsonify }},
6
+ "description": {{ edition_description | jsonify }},
6
7
  "lang": {{ site.conference.lang | default: 'en' | jsonify }},
7
- "start_url": {{ site.baseurl | append: '/' | jsonify }},
8
+ "start_url": {{ site.baseurl | append: edition_base | append: '/' | jsonify }},
8
9
  "scope": {{ site.baseurl | append: '/' | jsonify }},
9
10
  "display": "standalone",
10
11
  "background_color": {{ site.conference.pwa.background_color | default: '#ffffff' | jsonify }},
@@ -33,7 +34,7 @@
33
34
  {%- endif %}
34
35
  "shortcuts": [
35
36
  {%- assign first_shortcut = true -%}
36
- {%- for link in site.conference.navigation.links -%}
37
+ {%- for link in edition_nav_links -%}
37
38
  {%- unless link.pwa_hide or link.live or link.menu -%}
38
39
  {%- include get_link.html %}
39
40
  {%- unless first_shortcut -%},{%- endunless -%}
@@ -1,6 +1,7 @@
1
+ {%- include get_edition.html -%}
1
2
  {%- include get_location_config.html -%}
2
3
  {% include header.html %}
3
- {% assign nbr_days = site.data.program.days | size -%}
4
+ {% assign nbr_days = edition_program.days | size -%}
4
5
 
5
6
  <h1 class="display-5 {% if nbr_days > 1 -%} mb-2 {%- else -%} mb-4 {%- endif %} text-break">
6
7
  {%- if page.title -%}
@@ -15,7 +16,7 @@
15
16
  {%- if nbr_days > 1 %}
16
17
  <nav aria-label="{{ site.data.lang[site.conference.lang].program.days | default: 'Conference days' }}">
17
18
  <ul class="nav nav-pills justify-content-center mb-3" id="program-tabs" role="tablist">
18
- {%- for d in site.data.program.days -%}
19
+ {%- for d in edition_program.days -%}
19
20
  {%- include get_day_hash.html %}
20
21
  <li class="nav-item" role="presentation">
21
22
  <a class="nav-link {%- if forloop.index == 1 %} active{% endif %}" id="tab-{{ day_hash }}" data-bs-toggle="tab" {%- if d.date -%}{%- include get_talk_timestamp.html %} data-ts="{{ timestamp_start }}" {%- endif %} href="#{{ day_hash }}" role="tab" aria-controls="{{ day_hash }}" aria-selected="{% if forloop.index == 1 %}true{% else %}false{% endif %}">{{ day_name | escape }}</a>
@@ -26,7 +27,7 @@
26
27
  <div class="tab-content" id="day-content">
27
28
  {%- endif %}
28
29
 
29
- {%- for d in site.data.program.days -%}
30
+ {%- for d in edition_program.days -%}
30
31
  {%- if nbr_days > 1 -%}
31
32
  {%- include get_day_hash.html %}
32
33
  <div class="tab-pane {%- if forloop.index == 1 %} active{% endif %}" id="{{ day_hash }}" role="tabpanel" aria-labelledby="tab-{{ day_hash }}">
@@ -39,7 +40,7 @@
39
40
  <th scope="col" class="program-time text-center" aria-label="{{ site.data.lang[site.conference.lang].program.time | default: 'Time' }}">#</th>
40
41
  {%- assign nbr_rooms = d.rooms | size -%}
41
42
  {%- for r in d.rooms -%}
42
- {%- assign room = site.rooms | where: 'name', r.name | first %}
43
+ {%- assign room = edition_rooms | where: 'name', r.name | first %}
43
44
  <th scope="col" class="program-talk text-center" id="room-{{ day_hash }}-{{ forloop.index }}">
44
45
  {%- if room.hide or location_hide -%}
45
46
  {{- room.name | escape -}}
@@ -126,11 +127,11 @@
126
127
  {%- endif %}
127
128
 
128
129
  {%- for r in d.rooms -%}
129
- {%- assign room = site.rooms | where: 'name', r.name | first -%}
130
+ {%- assign room = edition_rooms | where: 'name', r.name | first -%}
130
131
 
131
132
  {%- assign active_talk = false -%}
132
133
  {%- for t in r.talks -%}
133
- {%- assign talk = site.talks | where: 'name', t.name | first -%}
134
+ {%- assign talk = edition_talks | where: 'name', t.name | first -%}
134
135
 
135
136
  {%- include get_talk_time.html -%}
136
137
 
@@ -232,10 +233,10 @@
232
233
  </div>
233
234
  {%- endif -%}
234
235
 
235
- {%- if site.conference.talks.tracks %}
236
+ {%- if edition_tracks %}
236
237
  {%- unless page.hide_legend -%}
237
238
  <h2 class="h5 mt-4">{{ site.data.lang[site.conference.lang].program.legend | default: "Caption" }}</h2>
238
- {%- for track_prop in site.conference.talks.tracks %}
239
+ {%- for track_prop in edition_tracks %}
239
240
  <div class="d-block d-sm-inline-block m-1 p-1 ps-2 pe-2 bg-{{ track_prop.color | default: 'light' }}-subtle text-{{ track_prop.color | default: 'light' }}-emphasis border-start border-4 border-{{ track_prop.color | default: 'light' }}-subtle fw-normal">
240
241
  {{- track_prop.name | escape -}}
241
242
  </div>
data/_layouts/room.html CHANGED
@@ -1,3 +1,4 @@
1
+ {%- include get_edition.html -%}
1
2
  {%- include get_location_config.html -%}
2
3
  {%- assign this_room = page -%}
3
4
 
@@ -19,7 +20,7 @@
19
20
  {{ content }}
20
21
 
21
22
  {% assign room_talks = false %}
22
- {% for d in site.data.program.days %}
23
+ {% for d in edition_program.days %}
23
24
  {% include get_day_hash.html %}
24
25
  {% for r in d.rooms %}
25
26
  {% if this_room.name == r.name and r.talks.size > 0 %}
@@ -36,7 +37,7 @@
36
37
 
37
38
  <table class="mw-100">
38
39
  {%- for t in r.talks -%}
39
- {%- assign talk = site.talks | where: 'name', t.name | first -%}
40
+ {%- assign talk = edition_talks | where: 'name', t.name | first -%}
40
41
  {%- include show_talk_listed.html hide_day=true -%}
41
42
  {%- endfor -%}
42
43
  </table>
@@ -12,7 +12,7 @@
12
12
 
13
13
  <div class="col-count-1 col-count-md-2 col-count-lg-3">
14
14
  {% assign cur_letter = false %}
15
- {% assign speakers = site.speakers | sort_natural: 'last_name' %}
15
+ {% assign speakers = edition_speakers | sort_natural: 'last_name' %}
16
16
  {% for speaker in speakers %}
17
17
 
18
18
  {% assign last_letter = speaker.last_name | slice: 0 | capitalize %}
@@ -40,7 +40,7 @@
40
40
  {% endif %}
41
41
 
42
42
  {% assign active_speaker = false %}
43
- {% for talk in site.talks %}
43
+ {% for talk in edition_talks %}
44
44
  {% for speaker_name in talk.speakers %}
45
45
  {% if speaker_name == speaker.name %}
46
46
  {% assign active_speaker = true %}
@@ -53,11 +53,11 @@
53
53
  <h2 class="h5 mt-4 mb-2">{{ site.data.lang[site.conference.lang].speaker.talks | default: "Talks at this conference" }}:</h2>
54
54
 
55
55
  <table class="mw-100">
56
- {%- for d in site.data.program.days -%}
56
+ {%- for d in edition_program.days -%}
57
57
  {%- include get_day_hash.html -%}
58
58
  {%- for r in d.rooms -%}
59
59
  {%- for t in r.talks -%}
60
- {%- assign talk = site.talks | where: 'name', t.name | first -%}
60
+ {%- assign talk = edition_talks | where: 'name', t.name | first -%}
61
61
 
62
62
  {%- for speaker_name in talk.speakers -%}
63
63
  {%- if speaker_name == speaker.name -%}
@@ -71,11 +71,14 @@
71
71
  </table>
72
72
  {% endif %}
73
73
 
74
+ {%- include get_overview_url.html layout="speaker-overview" -%}
75
+ {%- if overview_url %}
74
76
  <p class="d-print-none d-pwa-none mt-5">
75
- <a href="{{ page.collection | prepend: '/' | prepend: site.baseurl }}" class="btn btn-outline-secondary">
77
+ <a href="{{ overview_url | prepend: site.baseurl }}" class="btn btn-outline-secondary">
76
78
  {% include icon.html name="people" %}&nbsp;{{ site.data.lang[site.conference.lang].overview | default: "Overview" }}
77
79
  </a>
78
80
  </p>
81
+ {%- endif %}
79
82
 
80
83
  {%- include footer.html -%}
81
84
  {%- else -%}
@@ -11,7 +11,7 @@
11
11
  {{ content }}
12
12
 
13
13
  {%- assign nbr_streams = 0 -%}
14
- {%- for room in site.rooms -%}
14
+ {%- for room in edition_rooms -%}
15
15
  {%- if room.live -%}
16
16
  {%- assign mod_nbr_streams = nbr_streams | modulo: 2 -%}
17
17
  {%- if mod_nbr_streams == 0 %}
@@ -24,7 +24,7 @@
24
24
  {%- include get_room_live_href.html %}
25
25
  {%- comment -%} Loaded by the embed module, after consent {%- endcomment %}
26
26
  <iframe data-embed-src="{{ room_live_href | escape }}" loading="lazy" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen title="{{ site.data.lang[site.conference.lang].live.stream | default: 'Live Stream' }}: {{ room.name | escape }}" aria-labelledby="stream-heading-{{ forloop.index }}"></iframe>
27
- {%- include embed_consent.html href=room_live_href click_to_load=site.conference.live.streaming.click_to_load %}
27
+ {%- include embed_consent.html href=room_live_href click_to_load=edition_live.streaming.click_to_load %}
28
28
  </div>
29
29
  </div>
30
30
 
data/_layouts/sw.js CHANGED
@@ -117,8 +117,20 @@ const networkFirst = async (event) => {
117
117
  // Cache first: versioned assets do not change once cached
118
118
  const cacheFirst = async (event) => (await caches.match(event.request)) || networkFirst(event);
119
119
 
120
+ // Folders of documents (e.g. slides, not offline): /documents/, with
121
+ // editions /<id>/documents/
122
+ {%- assign document_paths = "/documents/" | split: "," -%}
123
+ {%- if site.conference.editions.size > 0 -%}
124
+ {%- assign document_paths = "" | split: "" -%}
125
+ {%- for e in site.conference.editions -%}
126
+ {%- assign document_path = "/" | append: e.id | append: "/documents/" -%}
127
+ {%- assign document_paths = document_paths | push: document_path -%}
128
+ {%- endfor -%}
129
+ {%- endif %}
130
+ const DOCUMENT_PATHS = {{ document_paths | jsonify }};
131
+
120
132
  // Fetch event - only handle same-origin GET requests within the site,
121
- // except the service worker itself and documents (e.g. slides, not offline)
133
+ // except the service worker itself and documents
122
134
  self.addEventListener("fetch", (event) => {
123
135
  const { request } = event;
124
136
  const url = new URL(request.url);
@@ -126,7 +138,7 @@ self.addEventListener("fetch", (event) => {
126
138
  if (request.method !== "GET" || url.origin !== self.location.origin || !url.pathname.startsWith(`${BASE_URL}/`)) {
127
139
  return;
128
140
  }
129
- if (url.pathname === `${BASE_URL}/sw.js` || url.pathname.startsWith(`${BASE_URL}/documents/`)) {
141
+ if (url.pathname === `${BASE_URL}/sw.js` || DOCUMENT_PATHS.some((path) => url.pathname.startsWith(`${BASE_URL}${path}`))) {
130
142
  return;
131
143
  }
132
144
 
@@ -10,15 +10,15 @@
10
10
 
11
11
  {{ content }}
12
12
 
13
- {% if site.conference.talks.tracks %}
14
- {% for track_prop in site.conference.talks.tracks %}
13
+ {% if edition_tracks %}
14
+ {% for track_prop in edition_tracks %}
15
15
  <h2 class="h3 mt-4 mb-3">
16
16
  <span class="badge rounded-0 bg-{{ track_prop.color | default: 'light' }}-subtle text-{{ track_prop.color | default: 'light' }}-emphasis border-4 border-start border-{{ track_prop.color | default: 'light' }}-subtle d-block d-sm-inline text-wrap">
17
17
  {{ track_prop.name | escape }}
18
18
  </span>
19
19
  </h2>
20
20
  <ul class="list-unstyled">
21
- {% for talk in site.talks -%}
21
+ {% for talk in edition_talks -%}
22
22
  {% if talk.track == track_prop.name %}
23
23
  {% include get_talk_overview_talk.html %}
24
24
  {% endif %}
@@ -27,7 +27,7 @@
27
27
  {% endfor %}
28
28
  {% else %}
29
29
  <ul class="list-unstyled">
30
- {% for talk in site.talks -%}
30
+ {% for talk in edition_talks -%}
31
31
  {% include get_talk_overview_talk.html %}
32
32
  {%- endfor %}
33
33
  </ul>
data/_layouts/talk.html CHANGED
@@ -32,7 +32,7 @@
32
32
  </p>
33
33
 
34
34
  <div class="mb-3 p-0">
35
- {% for d in site.data.program.days -%}
35
+ {% for d in edition_program.days -%}
36
36
  {%- include get_day_hash.html -%}
37
37
  {%- for r in d.rooms -%}
38
38
  {%- for t in r.talks -%}
@@ -77,9 +77,12 @@
77
77
  {% endif %}
78
78
 
79
79
  <p class="d-print-none d-pwa-none mt-5">
80
- <a href="{{ page.collection | prepend: '/' | prepend: site.baseurl }}" class="btn btn-outline-secondary me-2">
80
+ {%- include get_overview_url.html layout="talk-overview" -%}
81
+ {%- if overview_url %}
82
+ <a href="{{ overview_url | prepend: site.baseurl }}" class="btn btn-outline-secondary me-2">
81
83
  {% include icon.html name="megaphone" %}&nbsp;{{ site.data.lang[site.conference.lang].overview | default: "Overview" }}
82
84
  </a>
85
+ {%- endif %}
83
86
 
84
87
  {%- include get_program_config.html -%}
85
88
  <a href="{{ program_url | prepend: site.baseurl }}" class="btn btn-outline-secondary">