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

Multi-authors support #2

Open
gouravkhunger opened this issue Aug 25, 2022 · 5 comments
Open

Multi-authors support #2

gouravkhunger opened this issue Aug 25, 2022 · 5 comments

Comments

@gouravkhunger
Copy link

Hi!

I saw that during setup for this blog you tried to use my jekyll plugin jekyll-auto-authors to support multiple automatically generated author pages, but reverted it back shortly after.

I am glad that you tried to use my plugin! But I was curious to know what caused you to remove the feature?

If it is something related to the plugin not working with GitHub pages, I am very glad to submit a fix in a PR that will make it work on GitHub through GitHub Actions! I am also willing to help on the setup if needed.

Looking forward to hear from you 😄

@sitjart
Copy link
Contributor

sitjart commented Oct 3, 2022

Hey! Thanks very much for reaching out. I didn't see your message.
I was so determined to get this plugin up and running but then I noticed I needed the jekyll-paginate-v2 gem (currently running the v1) and it was not compatible with github-pages.

We are now deploying the site on Netlify, so I'm trying again.
Would you mind if I contact you if I encounter any issues?

@gouravkhunger
Copy link
Author

Hi @sitjart, thanks for the response!

I can make a Pull Request to implement multi-authors support for your blog. Since Hacktoberfest is going on, I will receive points for the contributions I do to open source projects.

You could tell me about your needs and I could implement accordingly. I can give a brief example of how I use the plugin.

I made it specifically for my publication @genicsblog to manage multi-authors with ease. We use it in this way:

  • Author data is stored in _data/authors.yml file.
    The usernames are top level. Each username includes data about the user. For example, my username is gouravkhunger so my page is rendered at https://genicsblog.com/author/gouravkhunger/ and it displays my data.

  • The _config.yml has configuration for the plugin

  • The authors.html layout is where the data gets injected from the data file.
    Pagination is done automatically as the underlying logic is same as paginate-v2 plugin.

I know things are a bit tedious at first as I could have added authors support by contributing to the paginate-v2 plugin itself. I tried but the plugin author doesn't seem to accept any more contributions. So I had to build mine on top of it. But once it's implemented, it works smooth.

Yes, netlify supports custom plugins. But I still suggest to use the custom GitHub Action way of hosting site. That also supports custom plugins. I think Netlify if paid for teams/org. If not, it asks money after the blog surpasses certain number of views whereas GitHub has unlimited usage for free since your org is public. Another plus point is all the things would be on a single platform.

@sitjart
Copy link
Contributor

sitjart commented Oct 6, 2022

Hi @gouravkhunger!
That actually sounds fantastic. I’ve been looking at your genics blog to get some ideas on how to organise our repository and use your authors gem.

I guess you’ve seen we are there biomedical researches by training and I’m the one making my way through with the little coding I’m learning on my spare time. So any help we can get is very much appreciated!

We were hoping to get something very similar to what you created on your blog. I was already trying to do some work creating _data folder with the yml file for authors but I’m not going to lie, I struggled.

Authors should have a couple of lines of bio, avatar pic and the links to socials. I’d like to get what you have on the genics blog, where each author has a page listing all their posts.

I’d be happy to join some of the hacktoberfest sessions and woke together too if I’d prefer that.

What do you think?
Also, thanks so much in advance for wanting to work on our little open source project 🙌

@sitjart
Copy link
Contributor

sitjart commented Oct 10, 2022

Hi @gouravkhunger
I’ve seen you haven’t started doing any work in your forked repo, so I wanted to let you know that we’ve managed to fix the authors issue without any additional gems.
In any case, many thanks for your support and offer!

@gouravkhunger
Copy link
Author

Yes @sitjart, I got busy with some urgent work so couldn't start working on it. Just checked, your solution is also appropriate as well 😄

In the beginning, I implemented a very similar solution for genics. But as the site grew, the pages became large. The two issues I faced:

  • Adding new authors was tedious. Creating data, adding author file to collection, generating pages took time (verification was mess too, as our org is public anyone can apply to join).
  • Posts on the author page are not paginated. When number of posts grow that page will become large. Since there are images on author pages, the page becomes heavy to load.

I believe you may use the current setup as there is still time for it to start bothering you. Let me know if you wish to implement optimizations in the future!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants