mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-24 14:36:59 +02:00
feat: allow blog authors email (#6783)
This commit is contained in:
parent
7ec44bb32c
commit
6cbc58943e
14 changed files with 53 additions and 15 deletions
|
@ -11,7 +11,8 @@
|
|||
"title": "Docusaurus maintainer",
|
||||
"url": "https://sebastienlorber.com",
|
||||
"image_url": "https://github.com/slorber.png",
|
||||
"twitter": "sebastienlorber"
|
||||
"twitter": "sebastienlorber",
|
||||
"email": "lorber.sebastien@gmail.com"
|
||||
},
|
||||
"yangshun": {
|
||||
"name": "Yangshun Tay",
|
||||
|
|
|
@ -12,6 +12,7 @@ slorber:
|
|||
url: https://sebastienlorber.com
|
||||
image_url: https://github.com/slorber.png
|
||||
twitter: sebastienlorber
|
||||
email: lorber.sebastien@gmail.com
|
||||
|
||||
yangshun:
|
||||
name: Yangshun Tay
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
slorber:
|
||||
name: Sébastien Lorber
|
||||
title: Docusaurus maintainer
|
||||
email: lorber.sebastien@gmail.com
|
||||
url: https://sebastienlorber.com
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
|
||||
slorber:
|
||||
name: Sébastien Lorber (translated)
|
||||
title: Docusaurus maintainer (translated)
|
||||
email: lorber.sebastien@gmail.com
|
||||
|
|
|
@ -77,6 +77,7 @@ Array [
|
|||
</author>
|
||||
<author>
|
||||
<name>Sébastien Lorber (translated)</name>
|
||||
<email>lorber.sebastien@gmail.com</email>
|
||||
</author>
|
||||
</entry>
|
||||
</feed>",
|
||||
|
@ -238,6 +239,7 @@ Array [
|
|||
<pubDate>Fri, 14 Dec 2018 00:00:00 GMT</pubDate>
|
||||
<description><![CDATA[Happy birthday! (translated)]]></description>
|
||||
<content:encoded><![CDATA[<p>Happy birthday!</p>]]></content:encoded>
|
||||
<author>lorber.sebastien@gmail.com (Sébastien Lorber (translated))</author>
|
||||
</item>
|
||||
</channel>
|
||||
</rss>",
|
||||
|
|
|
@ -177,6 +177,7 @@ describe('loadBlog', () => {
|
|||
name: 'Yangshun Tay (translated)',
|
||||
},
|
||||
{
|
||||
email: 'lorber.sebastien@gmail.com',
|
||||
key: 'slorber',
|
||||
name: 'Sébastien Lorber (translated)',
|
||||
title: 'Docusaurus maintainer (translated)',
|
||||
|
|
|
@ -24,6 +24,7 @@ const AuthorsMapSchema = Joi.object<AuthorsMap>().pattern(
|
|||
url: URISchema,
|
||||
imageURL: URISchema,
|
||||
title: Joi.string(),
|
||||
email: Joi.string(),
|
||||
})
|
||||
.rename('image_url', 'imageURL')
|
||||
.or('name', 'imageURL')
|
||||
|
|
|
@ -57,9 +57,7 @@ async function generateBlogFeed({
|
|||
});
|
||||
|
||||
function toFeedAuthor(author: Author): FeedAuthor {
|
||||
// TODO ask author emails?
|
||||
// RSS feed requires email to render authors
|
||||
return {name: author.name, link: author.url};
|
||||
return {name: author.name, link: author.url, email: author.email};
|
||||
}
|
||||
|
||||
await mapAsyncSequential(blogPosts, async (post) => {
|
||||
|
|
|
@ -21,6 +21,7 @@ declare module '@docusaurus/plugin-content-blog' {
|
|||
imageURL?: string;
|
||||
url?: string;
|
||||
title?: string;
|
||||
email?: string;
|
||||
}
|
||||
|
||||
export type BlogPostFrontMatter = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue