Skip to content

Commit

Permalink
Allow for relative live streaming links
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzschmid committed Feb 28, 2022
1 parent e2bb9ff commit 36f0071
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
jekyll-theme-conference (3.4.0)
jekyll-theme-conference (3.6.0)
jekyll (~> 4.0)

GEM
Expand Down
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,22 @@ Each room is represented by a file in the `_rooms/` directory. It must begin wit

- the room's `name`
- optionally `hide: true` if the room's page should not be linked to, and
- optionally a URL pointing to a live stream for the given room during the conference (`live`, see the section _Live Indications & Streaming_ above).
- optionally under the `live` property a URL pointing to a live stream for the given room during the conference (see the section _Live Indications & Streaming_ above), either:
* as an `absolute_url`, or
* a `relative_url`.

Example:

```yaml
---
name: The Room
hide: false
live:
absolute_url: https://github.com
---
...
```

### Links

Expand Down
10 changes: 9 additions & 1 deletion _layouts/data.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
{%- assign first_room = true -%}
{%- for room in site.rooms %}
{%- if room.live -%}
{%- if room.live.absolute_url -%}
{%- assign room_live_href = room.live.absolute_url -%}
{%- elsif room.live.relative_url -%}
{%- assign room_live_href = room.live.relative_url | prepend: site.baseurl -%}
{%- else -%}
{%- continue -%}
{%- endif -%}

{%- unless first_room -%}
,
{%- else -%}
Expand All @@ -23,7 +31,7 @@
"{{ room.name }}": {
"id": {{ forloop.index }},
"name": "{{ room.name }}",
"href": "{{ room.live }}"
"href": "{{ room_live_href }}"
}
{%- endif -%}
{%- endfor %}
Expand Down
2 changes: 1 addition & 1 deletion jekyll-theme-conference.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |spec|
spec.name = "jekyll-theme-conference"
spec.version = "3.5.0"
spec.version = "3.6.0"
spec.authors = ["Lorenz Schmid"]
spec.email = ["lorenzschmid@users.noreply.github.com"]

Expand Down

0 comments on commit 36f0071

Please sign in to comment.