incubator-answer
incubator-answer copied to clipboard
Display github icon & username in UserInfo
Is your feature request related to a problem? Please describe.
Currently, the website in user info page shows the domain name of user's website.
Describe the solution you'd like
If user's website is hosted on a well-known service like github, it would be good if it can show the service icon and username like @conr2d.
Describe alternatives you've considered
Customizing additional user info items can be provided as a feature of administration.
The current temporary solution is to write GitHub information in the "about me" section.
The solutions I propose are as follows -
-
Pattern match the website URL with well knows hosting providers and conditionally render the corresponding icons. Relevant code in repository
Implementation details:
In the above code, the icon name needs to be changed conditionally.
-
In case of GitHub hosting, GitHub username can be found from the URL (As far as I understand the subdomain section of
github.ioin the website URL should work). Relevant code in repositoryImplementation details:
We can add a
divbelow the existingdata.usernameand create a GitHub page link by concatenating github username with githul base URL. We can additionally give the user the option to add custom GitHub profile URL instead of the one fetched from website, in case the website is hosted on some other GitHub account, for any particular reason, or disable the feature of extracting GitHub from website URL.
Please share your thoughts and feedback on these. If approved, I'm ready to proceed with implementation.