Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate profile h-card u-url text into link names #331

Closed
snarfed opened this issue Dec 2, 2022 · 1 comment
Closed

Propagate profile h-card u-url text into link names #331

snarfed opened this issue Dec 2, 2022 · 1 comment

Comments

@snarfed
Copy link
Owner

snarfed commented Dec 2, 2022

For the profile metadata link fields (#323), we should pull the link text out of the parsed mf2 and use it in attachment.name when available instead of hard coding Link. And fall back to title if text isn't available.

Specifically, we'd look up each URL in the parsed mf2's rel-urls, eg:

    "rel-urls": {
        "https://twitter.com/intent/user?screen_name=t": {
            "title": "follow me on Twitter",
            "text": " Twitter @t",
            "rels": [
                "me"
            ]
        },
        "..."
@snarfed snarfed changed the title Propagate u-url text into link names Jan 11, 2023
@snarfed
Copy link
Owner Author

snarfed commented Jan 22, 2023

Done! Example: https://indieweb.social/@tantek.com@tantek.com

One odd bug, the 🏠 emoji doesn't come through as the label for the https://tantek.com/ link due to microformats/mf2py#177 . Ah well.

snarfed added a commit to snarfed/granary that referenced this issue Jan 24, 2023
this attaches `displayName`s to `urls` based on HTML text or `title` attribute. for snarfed/bridgy-fed#331
@snarfed snarfed closed this as completed Jan 24, 2023
Jack5079 added a commit to Jack5079/Jack5079 that referenced this issue Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant