-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Conflict between wikilinks and permalinks #77
Comments
Thanks for bringing this up. When you write "wikilinks functionality", are you referring to how |
Yes, that is correct. Your example is spot on:
[[ cool title ]] links to /notes/cool%20title/?
When I use eleventy's permalinks, I need:
[[ cool title ]] to link to /notes/cool-title/
I'm only guessing about the cause because, as I've said, I'm not a coder.
But I wondered if it is in the regex you created?
BTW, I'm loving the work you did to get this going! Thanks so much.
…On Sun, Feb 20, 2022 at 8:59 AM Binyamin Aron Green < ***@***.***> wrote:
Thanks for bringing this up. When you write "wikilinks functionality", are
you referring to how [[ cool title ]] links to /notes/cool%20title/? I
want to be sure I'm understanding this correctly.
—
Reply to this email directly, view it on GitHub
<#77 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACT3WG24B72YSZIEGAKV5D3U4EMW3ANCNFSM5OZUKDWA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I'm not strong in this whole setup but I think the wikilinks to url's mostly happens inside of markdownit. You might be able to tweak behavour from inside your .eleventy.js file - line 9-23 sets some options for that component. Probably check out documentation here: https://github.com/markdown-it/linkify-it Actually - try changing line 18 from However doing so might also break backlinking in this templates notes. You might need to alter the compare for example in notes.11tydata.js line 6-8 or something. A workaround might be to use the [[my-note|my note]] syntax to link to the note correctly while displaying another text. I tend to agree with you though that being able to configure a bit more fuzzy matching on linking would be pretty nice, but other tools in this space seem to have the same restrictions, so begrudgingly I've transformed my notes to link with dashes, all lower case etc. Being pretty bad at js and webdev that seemed to be the easier option ;) |
This seems to replace the first space with a I'm not familiar with what Eleventy or Markdown-IT does enough to know how to do it, but it seems like running slugify on the link after it's processed by Markdown-IT may be a solution. The other issue is that somewhere the files are going from |
@jebeaudoin I extracted the core functionality here, and packaged it into an Eleventy Pplugin. If this is still a problem, please let me know over there. |
I will give this a whirl! Thanks so much. |
Describe the bug
I hate even to call this a "bug" -- but if I use Eleventy's permalink functionality to rewrite a URL, the wikilinks functionality won't be able to convert the link correctly.
To Reproduce
Help needed
I'm not a developer (obviously) but I think the issue is that what I am calling the "wikilinks" function rewrites the link using the standard escape characters for spaces. Can someone show me where in the code I can change the regex that is replacing the spaces with %20 -- so that I can simply change them to dashes?
Thanks in advance!
jack
The text was updated successfully, but these errors were encountered: