feat(plugin-blog): multi-authors support + authors.yml global configuration (#5396)

* Complete function

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* A lot of blank lines

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* More lenient validation

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Remove or

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Simpler logic

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Expand docs

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Better docs

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Dogfood

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* More writeup

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Polish

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Polish

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Move mergeAuthorMap to authors.ts

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Unbreak relative assets

* Update docs

* Clarify in docs

* simplify feed authors

* rename authorMap -> authorsMap

* mergeAuthorsMap -> getBlogPostAuthors

* website => 5 blog posts per page

* improve authors map file

* Extract new theme authors components + display in row

* add comment for meta array syntaxes

* blog => getPathsToWatch should watch authorsMap file

* remove useless v1 blog FBID frontmatter

* keep older frontmatter syntax for now

* revert blog frontmatter

* Better console message

* better blog authors frontmatter impl

* add multi authors to beta blog post + fix some authors margins

* fix React key

* Refactor: mdx loader should support a more flexible assets system (poc, not documented yet)

* better display of blog post authors: adapt layout to authors count + add line clamp

* smaller local image

* fix blog feed tests

* fix blog frontmatter tests + improve validation schema

* add more frontmatter tests

* add tests for getAuthorsMapFilePath

* tests for validateAuthorsMapFile

* add tests for readAuthorsMapFile

* test getAuthorsMap

* exhaustive tests for getBlogPostAuthors

* fix remaining tests

* missing blog plugin author tests

* fix windows tests

* improve blog multi-author's doc

* Use new format in init template

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Improve error message

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* update feed snapshot

* blog authors: limit to 2 cols + fix margins for no authors

* minor doc improvements

* better init template blog posts, demonstrating Blog features

* replace the legacy blog author frontmatter in remaining places

* Prefer using clsx

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* cleanup getColClassName

* remove blog author name/title line-clamping

Co-authored-by: slorber <lorber.sebastien@gmail.com>
This commit is contained in:
Joshua Chen 2021-08-26 18:21:58 +08:00 committed by GitHub
parent 8779c8ff4a
commit 493225a3c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
79 changed files with 1871 additions and 285 deletions

View file

@ -1,10 +1,6 @@
---
title: Introducing Docusaurus
author: Joel Marcey
authorURL: http://twitter.com/JoelMarcey
authorImageURL: https://graph.facebook.com/611217057/picture/?height=200&width=200
authorFBID: 611217057
authorTwitter: JoelMarcey
authors: JMarcey
tags: [documentation, blog, docusaurus]
---

View file

@ -2,8 +2,7 @@
title: How I Converted Profilo to Docusaurus in Under 2 Hours
author: Christine Abernathy
authorURL: http://twitter.com/abernathyca
authorImageURL: https://graph.facebook.com/1424840234/picture/?height=200&width=200
authorFBID: 1424840234
authorImageURL: https://github.com/caabernathy.png
authorTwitter: abernathyca
tags: [profilo, adoption]
---

View file

@ -3,7 +3,7 @@ title: Towards Docusaurus 2
author: Endilie Yacop Sucipto
authorTitle: Maintainer of Docusaurus
authorURL: https://github.com/endiliey
authorImageURL: https://avatars1.githubusercontent.com/u/17883920?s=460&v=4
authorImageURL: https://github.com/endiliey.png
authorTwitter: endiliey
tags: [new, adoption]
---

View file

@ -1,11 +1,8 @@
---
title: Happy 1st Birthday Slash!
author: Joel Marcey
authorTitle: Co-creator of Docusaurus
authorURL: https://github.com/JoelMarcey
authorImageURL: https://graph.facebook.com/611217057/picture/?height=200&width=200
authorFBID: 611217057
authorTwitter: JoelMarcey
authors:
- key: JMarcey
title: Co-creator of Docusaurus
tags: [birth]
---

View file

@ -1,10 +1,6 @@
---
title: Docusaurus 2019 Recap
author: Yangshun Tay
authorTitle: Front End Engineer at Facebook
authorURL: https://github.com/yangshun
authorImageURL: https://avatars1.githubusercontent.com/u/1315101?s=460&v=4
authorTwitter: yangshunz
authors: yangshun
tags: [recap]
---

View file

@ -1,10 +1,6 @@
---
title: Tribute to Endi
author: Joel Marcey
authorTitle: Technical Lead and Developer Advocate at Facebook
authorURL: https://github.com/JoelMarcey
authorImageURL: https://graph.facebook.com/611217057/picture/?height=200&width=200
authorTwitter: JoelMarcey
authors: JMarcey
tags: [endi, tribute]
---

View file

@ -1,10 +1,6 @@
---
title: Docusaurus 2020 Recap
author: Sébastien Lorber
authorTitle: Docusaurus maintainer
authorURL: https://sebastienlorber.com
authorImageURL: https://github.com/slorber.png
authorTwitter: sebastienlorber
authors: [slorber]
tags: [recap]
image: /img/docusaurus-2020-recap.png
---

View file

@ -1,10 +1,6 @@
---
title: Releasing Docusaurus i18n
author: Sébastien Lorber
authorTitle: Docusaurus maintainer
authorURL: https://sebastienlorber.com
authorImageURL: https://github.com/slorber.png
authorTwitter: sebastienlorber
authors: [slorber]
tags: [release, i18n]
image: /img/blog/2021-03-09-releasing-docusaurus-i18n/social-card.png
---

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View file

@ -1,10 +1,12 @@
---
title: Announcing Docusaurus 2 Beta
author: Sébastien Lorber
authorTitle: Docusaurus maintainer
authorURL: https://sebastienlorber.com
authorImageURL: ./img/author.jpeg
authorTwitter: sebastienlorber
authors:
- key: slorber
image_url: ./img/slorber.png
- JMarcey
- yangshun
- lex111
tags: [release, beta]
image: ./img/social-card.png
---

26
website/blog/authors.yml Normal file
View file

@ -0,0 +1,26 @@
JMarcey:
name: Joel Marcey
title: Technical Lead & Developer Advocate at Facebook
url: http://twitter.com/JoelMarcey
image_url: https://github.com/JoelMarcey.png
twitter: JoelMarcey
slorber:
name: Sébastien Lorber
title: Docusaurus maintainer
url: https://sebastienlorber.com
image_url: https://github.com/slorber.png
twitter: sebastienlorber
yangshun:
name: Yangshun Tay
title: Front End Engineer at Facebook
url: https://github.com/yangshun
image_url: https://github.com/yangshun.png
twitter: yangshunz
lex111:
name: Alexey Pyltsyn
title: Open-source enthusiast
url: https://github.com/lex111
image_url: https://github.com/lex111.png