hugo-toha / toha

A Hugo theme for personal portfolio
https://hugo-toha.github.io
MIT License
972 stars 562 forks source link

Imprt user stars and repos (See my implementation) #952

Open arran4 opened 2 weeks ago

arran4 commented 2 weeks ago

Describe the solution you'd like

I would like to dynamically import my stars and repos to the project. -- I have already done so, so copy the code if suitable?

Example:

However the issue is it doesn't look that great compared to the rest of it.

Describe alternatives you've considered

Or do it via JS.

Additional context

I was able to get it working for stars and repositories given the new feature: content adapters in v0.126.0:

https://gohugo.io/content-management/content-adapters/

You can see most of the work for repos in this comment:

https://github.com/arran4/arran4.github.io/commit/49262126fa19221cbcbe4bbdcfdcc7b17efeeb5e

The stars is basically the same but you want some minor differences between them.

arran4 commented 2 weeks ago

It does add a lot of time to the compilation though if you have a lot of stars. But it does make it a lot easier to find your stars.

hossainemruz commented 2 weeks ago

Nice and useful idea. I need it for myself.

I think we need a separate card layout for it to make it look nicer. The card heading and footer are totally unnecessary for this. I will try to come up with something whenever I get some time. Thank you for sharing.

arran4 commented 2 weeks ago

Thanks. No problem. I ran out of time to make it "look good" but it works.