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

Can't add a Mastodon link in links and labels #57

Open
RMRubert opened this issue Apr 28, 2022 · 6 comments
Open

Can't add a Mastodon link in links and labels #57

RMRubert opened this issue Apr 28, 2022 · 6 comments

Comments

@RMRubert
Copy link

Hello,

so when a mastodon link (that contains an @) is added, the render doesn't happen properly.

Example:
`---
title: "Name"

links:

imagen

Is there any way to force the url to not swap mode when the @ is added?

@RMRubert
Copy link
Author

I tried replacing the @ with %40, it does compiles correctly, but the link gives me a 404. At least on firefox.
https://im-in.space/@rmrubert
https://im-in.space/%40rmrubert

@jhelvy
Copy link

jhelvy commented Nov 14, 2022

Same. Others have posted on this here: https://mastodon.social/@ajamesgreen/109341659266526443

It looks like the @ symbol in the url is being rendered as a citation. Not sure if this is something that can be handled via {postcards} or if it should be handled in {distill}.

@cderv any thoughts?

@limegreen
Copy link

Thanks for being my post across to here @jhelvy

@cderv
Copy link

cderv commented Nov 14, 2022

Usually when you want to add a @ in a doc where citation is activated, you need to escape it using \ so I would try \@ .

Usually any special markdown character (and @ is among them as used for citation) needs to be escaped when wished to be showed verbatim asis https://bookdown.org/yihui/rmarkdown-cookbook/special-chars.html

Hopefully, this is what happens here. This would mean the link added in YAML is processed as Markdown or inserted in a pre render step.

@jhelvy
Copy link

jhelvy commented Nov 14, 2022

Welp, that did it! Except I needed to use \\, like this:

  - label: '<i class="fab fa-mastodon fa-lg"></i>'
    url: "https://fediscience.org/\\@jhelvy"

@rdelrossi
Copy link

Glad to have come across this thread! Thank you @cderv and @jhelvy.

etiennebacher added a commit to etiennebacher/personal_website_distill that referenced this issue Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants