Skip to content
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

RFC: Blog authors pages #10196

Open
2 tasks done
OzakIOne opened this issue Jun 4, 2024 · 1 comment · May be fixed by #10216
Open
2 tasks done

RFC: Blog authors pages #10196

OzakIOne opened this issue Jun 4, 2024 · 1 comment · May be fixed by #10216
Labels
feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.

Comments

@OzakIOne
Copy link
Collaborator

OzakIOne commented Jun 4, 2024

Have you read the Contributing Guidelines on issues?

Description

A page with a list of author names, grouped by letters (eg: Author Geoff Graham — Smashing Magazine / Chris Coyier on CSS-Tricks - Archive )
A view all authors page like : View all tags /blog/tags

Here is a visual for the view all author page: view all authors

I'll try to mock a visual for the new design of blog/authors/${name} and the new design when viewing a blog post with the social icons

Here is a visual for blog/authors/${name}

design 3

Has this been requested on Canny?

https://docusaurus.io/feature-requests/p/blog-author-pages

Motivation

It's a nice feature to have which other blogs have and it has already been implemented and asked by the community

@halildurmus
@shochdoerfer
@reda-jaifar
@ilg-ul
Have shown their interest in this feature

Perhaps you have ideas for the visuals, I've made some quick mockups if you have any preference or ideas tell me

API design

recap from existing conversation about this feature : docusaurus #9825

we should generate an author page for all authors.yaml authors by default, and have an option to opt-out.
blog.generateAuthorsPage: boolean (defaults: true if authors.yml exists)

The author.url should also be removed and replaced by blog/authors/${name} list url just like others blogs (smashingmagazine)

Maybe we might add a blog.postsPerAuthorPage just like the https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog#postsPerPage

Then you can swizzle the author page and decide to sort, group, and display the posts of that author the way you want. You can order the post by date, event_date, last update time or whatever you want, implement your own layout, and group the posts by whatever attribute or custom front matter.

First introduce the ability to have "social icons" next to the author's name (asked here)
Which websites should we support for the logos ? Twitter github medium ? Should we not use logos at all ?

description will removed in favor of social icons unless there is none.
We'll still show the description in the blog/authors/${name}

The api and design for view all authors should be fairly similar to view all tags

Have you tried building it?

Implemented by @ilg-ul in cronica-it@7465833
The implementation adds a NamedAuthor type, similar to Tag and the code is basically a duplicate of the tag logic.

Self-service

  • I'd be willing to contribute this feature to Docusaurus myself.
@OzakIOne OzakIOne added feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. status: needs triage This issue has not been triaged by maintainers labels Jun 4, 2024
@OzakIOne OzakIOne changed the title Blog authors pages RFC: Blog authors pages Jun 4, 2024
@OzakIOne OzakIOne removed the status: needs triage This issue has not been triaged by maintainers label Jun 4, 2024
@ilg-ul
Copy link
Contributor

ilg-ul commented Jun 6, 2024

My code is indeed a duplicate of the tag logic, which is relatively complicated, perhaps you can do it better.

One major issue I encountered was the lack of a unique key in the Author definition, needed to generate the permalink.

I don't know now, but by the time I did that experimental implementation, the author name was neither mandatory, nor unique, thus the need to add a new definition NamedAuthor with a unique field, and an array of such objects, with the authors that have a name allowing to generate the unique field (see the makePermalinkFromAuthorName() function).

If needed, you can reuse any parts of my code, everything is licensed under MIT, so a short reference to the initial author is enough.

@OzakIOne OzakIOne linked a pull request Jun 13, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants