Skip to content

Commit b081355

Browse files
authored
Default to "GitHub" as author in guide-card (#16717)
* Default authors to ['GitHub'] * Remove now-redundant GitHub authors
1 parent 685e7a3 commit b081355

3 files changed

Lines changed: 30 additions & 31 deletions

File tree

content/actions/guides/publishing-nodejs-packages.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ redirect_from:
88
versions:
99
free-pro-team: '*'
1010
enterprise-server: '>=2.22'
11-
authors:
12-
- GitHub
1311
---
1412

1513
{% data reusables.actions.enterprise-beta %}

content/actions/guides/setting-up-continuous-integration-using-workflow-templates.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ redirect_from:
1111
versions:
1212
free-pro-team: '*'
1313
enterprise-server: '>=2.22'
14-
authors:
15-
- GitHub
1614
---
1715

1816
{% data reusables.actions.enterprise-beta %}

includes/guide-card.html

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,40 @@
1-
{% assign authorsString = guide.page.authors | join: ", @" %}
1+
{% if guide.page.authors %}
2+
{% assign authors = guide.page.authors %}
3+
{% else %}
4+
{% assign authors = 'GitHub' | split: ' ' %}
5+
{% endif %}
6+
{% assign authorsString = authors | join: ", @" %}
27

38
<div class="col-lg-4 col-12 mb-3">
49
<a class="Box box-shadow-medium height-full d-block hover-shadow-large no-underline text-gray-dark p-5" href="{{ guide.href }}">
510
<h2>{{ guide.title }}</h2>
611
<p class="mt-2 mb-4 text-gray-light">{{ guide.intro }}</p>
712

8-
{% if guide.page.authors and guide.page.authors.length > 0 %}
9-
<footer class="d-flex">
10-
<div class="mr-1">
11-
{% if guide.page.authors.length == 1 %}
12-
<img class="avatar avatar-2 circle mr-1" src="https://github.com/{{ guide.page.authors[0] }}.png" alt="@{{ guide.page.authors[0] }}" />
13-
{% else %}
14-
<div class="AvatarStack AvatarStack--three-plus">
15-
<div
16-
class="AvatarStack-body tooltipped tooltipped-se tooltipped-align-left-1"
17-
aria-label="@{{ authorsString }}"
18-
>
19-
{% for author in guide.page.authors %}
20-
<img
21-
class="avatar circle"
22-
alt="@{{ author }}"
23-
src="https://github.com/{{ author }}.png"
24-
/>
25-
{% endfor %}
26-
</div>
13+
<footer class="d-flex">
14+
<div class="mr-1">
15+
{% if authors.length == 1 %}
16+
<img class="avatar avatar-2 circle mr-1" src="https://github.com/{{ authors[0] }}.png" alt="@{{ authors[0] }}" />
17+
{% else %}
18+
<div class="AvatarStack AvatarStack--three-plus">
19+
<div
20+
class="AvatarStack-body tooltipped tooltipped-se tooltipped-align-left-1"
21+
aria-label="@{{ authorsString }}"
22+
>
23+
{% for author in authors %}
24+
<img
25+
class="avatar circle"
26+
alt="@{{ author }}"
27+
src="https://github.com/{{ author }}.png"
28+
/>
29+
{% endfor %}
2730
</div>
28-
{% endif %}
29-
</div>
31+
</div>
32+
{% endif %}
33+
</div>
3034

31-
<div>
32-
@{{ authorsString }}
33-
</div>
34-
</footer>
35-
{% endif %}
35+
<div>
36+
@{{ authorsString }}
37+
</div>
38+
</footer>
3639
</a>
3740
</div>

0 commit comments

Comments
 (0)