halogenica / beautifulhugo

Theme for the Hugo static website generator
Other
1.14k stars 601 forks source link

Make the Gitlab icon link more general #436

Closed stafusa closed 2 years ago

stafusa commented 2 years ago

One nice advantage of gitlab, compared to github, is the possibility of hosting it somewhere else than gitlab.com, but right now in beautifulhugo you can't link the social icon to any other instance of gitlab.

Suggestion
To make it possible, in the theme file themes/beautifulhugo/data/beautifulhugo/social.toml, for the base gitlab URL to be different from the default https://gitlab.com/, in order to permit linking to instances hosted elsewhere. The simplest way to achieve this is probably by changing url = "https://gitlab.com/%s" to url = "%s". Leaving it to the user to provide the full URL.

It's rather easy to implement and would be a welcome improvement.

RoneoOrg commented 2 years ago

Good idea! Would you like to submit a PR @stafusa ?

stafusa commented 2 years ago

Yes, I can give it a try. @RoneoOrg

Can I create a branch here or should I do it from a fork?

RoneoOrg commented 2 years ago

Yes, I can give it a try.

Great!

Can I create a branch here or should I do it from a fork?

You have to use a fork

stafusa commented 2 years ago

@RoneoOrg There it is: Two lines. :-) I guess it'll be easy to review.