# Normalized Profile Links

**URL:** https://meta.discourse.org/t/normalized-profile-links/345494
**Category:** Theme component
**Created:** [January 3, 2025, 8:42pm UTC](https://meta.discourse.org/t/normalized-profile-links/345494 "2025-01-03T20:42:29Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [January 3, 2025, 8:42pm UTC](https://meta.discourse.org/t/normalized-profile-links/345494/1 "2025-01-03T20:42:29Z")

</div>

| | | |
| --- | --- | --- |
| ℹ | **Summary** | Add links to user card and profile |
| 🛠 | **Repository** | [GitHub - literatecomputing/normalized-profile-links: Add profile links and normalize the user part (e.g., make https://twitter.com/user or @user both be user) · GitHub](https://github.com/literatecomputing/normalized-profile-links) |
| ❓ | **Install Guide** | [How to install a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682) |
| 📖 | **New to Discourse Themes?** | [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) |

Install this theme component

Add `user_custom_field` links to user card and profile and attempt to deal with bad user entries. Allow adding links to arbitrary sites.

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/9/1/69100337a0d5d9594effb33f82badc1a185bcf10.png)

 ![Profile settings page for normalization with selected profile data fields, icon, and processing options. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/0/b/f/0bf63e2b926ec8e3b1c7d8b147e44ffe38d408bd.png)

For example, a user might enter any of these for Twitter (X):

- `https://x.com/MyHandle`
- `https://twitter.com/MyHandle`
- `https://www.twitter.com/MyHandle`
- `x.com/MyHandle`
- `twitter.com/MyHandle`
- `/MyHandle`
- `@MyHandle`
- `MyHandle`

This theme component will make all of those become “MyHandle”, so if a user enters any of those in the twitter field, the link will become `https://x.com/MyHandle`. For a site like YouTube where an @ is needed in the URL for the profile link, you need to make the link URL be `https://youtube.com/@', so that the link will become `[https://youtube.com/@MyHandle`](https://youtube.com/@MyHandle%60). I considered making the `@` be part of the handle, but that makes breaks things if a user enters `@literatecomputing.com` as their BlueSky handle since BlueSky wants the profile URL to be `https://bsky.app/profile/literatecomputing.com` with **no** `@`.

Settings allow adding any site you wish that has some kind of handle that can be appended to some URL.

Note that the `custom_field_name` and link name are **case sensitive**. I considered trying to fix this but it was a pain and I decided that admins can deal with making the case match. (Thanks to @NateDhaliwal for trying the theme component and to @Moin and @Richie for pointing out that case sensitivity was an issue.)

If you require additional [Font Awesome Icons](https://fontawesome.com/v6/search?o=r&m=free) you can add them to the Additional Icons setting.

A bunch of the sample settings (and associated icons) are provided by AI completion and not tested. You can make changes to the settings yourself, but if you let me know about a broken one (via email or PR) I will be happy to fix it.

Another feature I have considered is making it possible to have entries appear on only the User Card or User Profile, rather than both. If that’s of interest, please let me know, especially if you have a budget.

### Why Yet _Another_ Custom Field Theme Component?

The Official [Custom Profile Link](https://meta.discourse.org/t/custom-profile-link/295470) adds a link for only one custom field. (🤷)

[Multiple Custom Profile Links](https://meta.discourse.org/t/multiple-custom-profile-links/295547) is similar to this, but this component adds

- a simpler customization interface,
- some error checking/fixing of users adding semi-bogus entries,
- and the ability to add links to custom services/sites.

Thanks to [Grey Arrows Drone Club](https://greyarro.ws/) for funding initial development!

---

_[View the full topic](https://meta.discourse.org/t/normalized-profile-links/345494)._
