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

[FR] add an option to include the encoded file in the URL #86

Closed
huyz opened this issue Oct 27, 2022 · 10 comments
Closed

[FR] add an option to include the encoded file in the URL #86

huyz opened this issue Oct 27, 2022 · 10 comments

Comments

@huyz
Copy link

huyz commented Oct 27, 2022

For human-friendly URLs, it would be nice if the file= part of the built-in Obsidian URL were also appended to this plugin's advanced URI. That way when we run into this URL in the wild, we can tell at a glance what it's about. (Similar purpose as URL slugs)

@Vinzent03
Copy link
Owner

I don't understand the benefit of including an file parameter if it's not used. What do you mean with:

when we run into this URL in the wild, we can tell at a glance what it's about.

@huyz
Copy link
Author

huyz commented Oct 27, 2022

So when you see a URL, you know what it's about. Maybe you have the wrong one? Maybe you need to move URLs around. Maybe you're including several, and how can you distinguish them?

You remember why slugs became a thing in URLs? https://en.wikipedia.org/wiki/Clean_URL

@Vinzent03
Copy link
Owner

But you just want to make the url longer by adding a redundant parameter. This improves nothing.

@huyz
Copy link
Author

huyz commented Nov 8, 2022

Well, it's not for everyone, which is why it should be an option. But clearly some people like human-readable URLs.
Maybe, you like insert URLs like https://stackoverflow.com/q/44558955/161972 in your notes or code comments, but I always expand them to https://stackoverflow.com/questions/44558955/vscode-normal-word-completion because that's more user-friendly: I get a hint about whether I want to click on the URL or not just by looking at the URL, saving me time.
How is that "nothing"?

In any case, it's clear you don't like it, which is fine.

@huyz huyz closed this as completed Nov 8, 2022
@Vinzent03
Copy link
Owner

But the uri already has the filepath parameter. The file parameter would have the same value? I think we talk past each other.

@huyz
Copy link
Author

huyz commented Nov 8, 2022

The filepath is there if I don't turn on UID in the options. The problem with filepath is of course that it's brittle if I rename a note or move it to another folder. That's the benefit of UID: it's permanent. So I have UID turned on.

But then I wanted my cake and eat it too:

  1. uid= for computer consumption to be used by your plugin to find the note
  2. and something for human consumption:file= or title= or #title= at the end of the URL for when I'm actually reading the URL. Your plugin would just ignore that.

@huyz
Copy link
Author

huyz commented Nov 8, 2022

Sorry, I think the confusion was that I forgot that I had enabled the UID option long ago. I thought that everyone had UID on by default. My bad, I should have been clearer.

@Vinzent03
Copy link
Owner

Ah now I understand your issue. I always forget the uid option. Will think about a solution.

@Vinzent03 Vinzent03 reopened this Nov 8, 2022
@Vinzent03
Copy link
Owner

There is now a new setting, adding the filepath parameter.

@huyz
Copy link
Author

huyz commented Nov 23, 2022

@Vinzent03 Thanks so much!

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

2 participants