From b081355d42252b95d7724e964d83929e3fb08939 Mon Sep 17 00:00:00 2001 From: Jason Etcovitch Date: Wed, 2 Dec 2020 11:32:37 -0500 Subject: [PATCH] Default to "GitHub" as author in guide-card (#16717) * Default authors to ['GitHub'] * Remove now-redundant GitHub authors --- .../guides/publishing-nodejs-packages.md | 2 - ...us-integration-using-workflow-templates.md | 2 - includes/guide-card.html | 57 ++++++++++--------- 3 files changed, 30 insertions(+), 31 deletions(-) diff --git a/content/actions/guides/publishing-nodejs-packages.md b/content/actions/guides/publishing-nodejs-packages.md index 294001e7ee07..f428baed2808 100644 --- a/content/actions/guides/publishing-nodejs-packages.md +++ b/content/actions/guides/publishing-nodejs-packages.md @@ -8,8 +8,6 @@ redirect_from: versions: free-pro-team: '*' enterprise-server: '>=2.22' -authors: - - GitHub --- {% data reusables.actions.enterprise-beta %} diff --git a/content/actions/guides/setting-up-continuous-integration-using-workflow-templates.md b/content/actions/guides/setting-up-continuous-integration-using-workflow-templates.md index a480a4824a3a..a10ab35eaf7e 100644 --- a/content/actions/guides/setting-up-continuous-integration-using-workflow-templates.md +++ b/content/actions/guides/setting-up-continuous-integration-using-workflow-templates.md @@ -11,8 +11,6 @@ redirect_from: versions: free-pro-team: '*' enterprise-server: '>=2.22' -authors: - - GitHub --- {% data reusables.actions.enterprise-beta %} diff --git a/includes/guide-card.html b/includes/guide-card.html index feb6779b45d8..a05c022cd4f4 100644 --- a/includes/guide-card.html +++ b/includes/guide-card.html @@ -1,37 +1,40 @@ -{% assign authorsString = guide.page.authors | join: ", @" %} +{% if guide.page.authors %} + {% assign authors = guide.page.authors %} +{% else %} + {% assign authors = 'GitHub' | split: ' ' %} +{% endif %} +{% assign authorsString = authors | join: ", @" %}

{{ guide.title }}

{{ guide.intro }}

- {% if guide.page.authors and guide.page.authors.length > 0 %} -
-
- {% if guide.page.authors.length == 1 %} - @{{ guide.page.authors[0] }} - {% else %} -
-
- {% for author in guide.page.authors %} - @{{ author }} - {% endfor %} -
+
+
+ {% if authors.length == 1 %} + @{{ authors[0] }} + {% else %} +
+
+ {% for author in authors %} + @{{ author }} + {% endfor %}
- {% endif %} -
+
+ {% endif %} +
-
- @{{ authorsString }} -
-
- {% endif %} +
+ @{{ authorsString }} +
+