-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blog: author profile list file #5363
Comments
Yes we should definitively support that, as long as we can stay retrocompatible with existing frontmatter. My blog Gatsby theme (Novela) also has such feature: https://github.com/slorber/sebastienlorber.com/tree/master/content/authors |
That means we need only to store that data in a json/yml file right? |
@shakyapeiris Yes, although you can't be exempted from front matter entirely though because you have to use an |
Ok Thanks |
We also have a need for blog posts with multiple authors. So we'd likely use a frontmatter like Not sure it's worth supporting multiple authors with existing frontmatter attributes. It would probably require a breaking change so that the existing frontmatter can support the list, so we may do this but later. Note: author image URL can use a co-located asset in the folder's blog post now. Not sure we need this feature for "global blog authors" though |
I tried a very rough implementation and I noticed it's hard to co-locate assets in the global file. I guess we can only support using URLs to reference images in global files, but allow overriding this with a collocated image in front matter? We can certainly make |
There has also been requests for author pages:
After we have unique author keys this feature may be easier to implement? |
🚀 Feature
A separate author profile list file to prevent duplicating author information in every markdown front matter.
Have you read the Contributing Guidelines on issues?
Yes
Has this been requested on Canny?
Actually yes. https://docusaurus.io/feedback/p/add-unified-authors-data-file-to-reduce-header-attributes-for-blog-posts
Motivation
I am building an org blog where three authors take turns to write posts. Maintaining three sets of author information is a pain, especially when their avatars/description changes. Having a separated data file will make this much easier.
From the canny request:
API Design
The Jekyll design, just for reference. We can have a
/blog/data/authors.yml
(JSON can work as well, of course), in which we put all the authors:And then use them with a new
author_key: Author 1
front matter in a blog post. User can still override those values inauthors.yml
within the post's front matter for more granular control.Have you tried building it?
Not yet, would be willing to work on it
The text was updated successfully, but these errors were encountered: