Closed stafusa closed 1 year ago
Would it be possible to detect if the host was missing and include a default? This will break all existing websites linking to gitlab.
Would it be possible to detect if the host was missing and include a default? This will break all existing websites linking to gitlab.
True, allowing different hosts is probably not important enough to break current configurations. At the same time I wouldn't want to make Gitlab a special case with dedicated HTML code and new variables.
What do you think of introducing "gitlab-alt", that takes "server/username" (like my current suggestion), and bringing back "gitlab" the way as it is in main, with gitlab.com implicit?
Edit: Do you think it's a good solution @henryiii ? I could implement it.
I don't think that scales to other uses very well. GitHub also allows custom host URLs, so it would also be nice there. Where is this being consumed? I think we should first verify it's not easy just to detect a slash and add a default if it's not present.
Edit: as a more general solution, I'd say a full URL here ideally would render as a full URL. The final consumer is
So if that just checked to see if it started with https://
, then used it directly, wouldn't that be a more general solution that would also work for GitHub and others?
Edit: as a more general solution, I'd say a full URL here ideally would render as a full URL. The final consumer is
So if that just checked to see if it started with
https://
, then used it directly, wouldn't that be a more general solution that would also work for GitHub and others?
That's definitely a proper way of doing it @henryiii . Thanks for the pointer. Please check whether I got something wrong in my latest implementation. It tests for "http[s]://" as you suggested.
LGTM! Will wait a day or so to see if any other maintainers have input, then will merge. (remind me if I forget!)
@henryiii Your friendly reminder. :)
Closes #436