Skip to content

Commit 44d34f5

Browse files
committed
Add support for new contributor frontmatter object
1 parent 5f70c49 commit 44d34f5

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

includes/article.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ <h1 class="border-bottom-0">{{ page.title }}</h1>
2020
</div>
2121
</div>
2222

23+
{% if page.contributor %}
24+
<div class="partner-callout border rounded-1 mb-4 p-3 border-blue bg-blue-light f5">
25+
<p>This page is kindly contributed and maintained by <a href="{{ page.contributor.URL }}" rel="nofollow">{{ page.contributor.name }}</a>.</p>
26+
</div>
27+
{% endif %}
28+
2329
{% if page.intro %}
2430
<div class="lead-mktg">{{ page.intro }}</div>
2531
{% endif %}

lib/frontmatter.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ const schema = {
119119
defaultPlatform: {
120120
type: 'string',
121121
enum: ['mac', 'windows', 'linux']
122+
},
123+
// Documentation contributed by a third party, such as a GitHub Partner
124+
contributor: {
125+
type: 'object',
126+
properties: {
127+
name: { type: 'string' },
128+
URL: { type: 'string' }
129+
}
122130
}
123131
}
124132
}

0 commit comments

Comments
 (0)