Skip to content

Commit 21112fd

Browse files
authored
Merge pull request #1553 from erasche/admin-dev-chat
Add gitter sidecar for admin/dev topics
2 parents 34b0e5c + a854e3f commit 21112fd

File tree

6 files changed

+27
-0
lines changed

6 files changed

+27
-0
lines changed

_layouts/topic.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
{% assign topic_material = site.pages | topic_filter:page.topic_name %}
1111
{% assign language = site.other_languages | split: ", " %}
1212

13+
{% if topic.gitter %}
14+
<script>
15+
((window.gitter = {}).chat = {}).options = {
16+
room: '{{ topic.gitter }}'
17+
};
18+
</script>
19+
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
20+
{% endif %}
21+
1322
<div class="container main-content">
1423
<section>
1524
<h1>{{ topic.title }}</h1>

_layouts/tutorial_hands_on.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@
2828
{% endif %}
2929
{% endfor %}
3030

31+
{% if topic.gitter %}
32+
<script>
33+
((window.gitter = {}).chat = {}).options = {
34+
room: '{{ topic.gitter }}'
35+
};
36+
</script>
37+
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
38+
{% endif %}
39+
3140
<header>
3241
<nav class="navbar navbar-expand-lg navbar-dark">
3342
<div class="container">

bin/schema-topic.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,7 @@ mapping:
8282
required: true
8383
summary:
8484
type: str
85+
gitter:
86+
type: str
87+
required: false
88+
pattern: /^[a-zA-Z0-9]+\/[a-zA-Z0-9]+/

topics/admin/metadata.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ maintainers:
1818
- martenson
1919
- erasche
2020
- slugger70
21+
22+
gitter: galaxyproject/admins

topics/contributing/tutorials/create-new-topic/tutorial.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ Several metadata are defined in `metadata.yaml` file in your topic folder to :
174174
tutorials can be assigned to subtopics by adding e.g. `subtopic: singlecell` to the tutorial metadata. An example of this subtopic division can be found in the [admin section]({{site.baseurl}}/topics/admin/ )
175175
176176
- `maintainers`: GitHub username of people maintaining the topic
177+
- `gitter`: The name of the chatroom on Gitter, if enabled, it will be embedded on the topic and tutorial pages. Should be formatted like `../..`, without the `https://gitter.im`, e.g. `galaxyproject/dev`
177178
178179
> ### {% icon hands_on %} Hands-on: Update the new topic to the website
179180
>

topics/dev/metadata.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ maintainers:
99
- lecorguille
1010
- bebatut
1111
- erasche
12+
13+
gitter: galaxyproject/dev

0 commit comments

Comments
 (0)