I am a new user today, so forgive me if I have missed this. I’m trying to create a couple hooks to hash links to different sections of a web page. Is this possible? For example:
These seem to confuse Hook and it will create the reference to the first hash link, but then ignore any attempt to add the 2nd. I’ve tried renaming the 1st Hook before adding the 2nd, but that does not appear to work.
Hook to Copied Link abstracts the fragment (#…) of http(s) URLs.
Suppose you
hook https://cloud.google.com/inference/docs/quickstart to bar
hook https://cloud.google.com/inference/docs/quickstart#before_you_begin to foo
hook https://cloud.google.com/inference/docs/quickstart#upload_a_dataset to baz
Now regardless of the three https://cloud.google.com/inference/docs/quickstart URLs you invoke Hook on, Hook will show you foo, bar and Baz.
The Copy Link command will give you the precise URL that is in the address bar, with the fragment. So when you paste it in a file, you’ll get exactly that fully qualified URL (with any fragment).
Whether Hook adds multiple instances of the URL for URLs with different fragments to its database is not defined. So when you search, you may seem some URLs with the fragment and/or some without. But you will see at least one of the https://cloud.google.com/inference/docs/quickstart URLs.
Are you not seeing what you expect in the Hook window? If so could you elaborate?
I work with support cases in Salesforce, so my starting point is usually the case page for a specific case. If I’m recommending documentation links to the customer, I often use a hash link to the documentation section. Many of the documentation pages are long with many sections, so I don’t want to just link to the top-level doc page - I want to help the customer find the exact spot, and I want to remember that exact spot too (via the hook).
I’d like to be able to hook the hash links so that I can see every single reference I’ve provided to the customer. Over time, I’ll be able to go to the documentation URL and see all the cases I’ve linked to it - that will help find related cases that I’ve forgotten about.
As an example, I tried to hook both of the hash links (#before_you_begin and #upload_a_datdaset) to this forum page using Hook to Copied Link but when I call up the hook entries associated with this forum page, I only see the first one.
Thanks for clarifying, @hamjamon . We’d need to add special support in Hook for that, as an option or some UI navigation elements (such as a tree-like structure in which the URL could be unfolded into its fragments; or a preference or command to show all the deep hooks). I think the current behavior as default hits the largest number of use cases, because normally (or at least very often), additional fragments would add clutter. Consider a case where this particular web page not only hooks to several web pages each of which has fragments. The page might also link to other stuff, like emails and PDFs. It’s easy to be too specific, accidentally adducing fragments when they are not desired. However, we definitely see your use case. I’ve added your request to related internal feature requests.
To argue the case against fragments (not that I necessarily object to including them in Hook), it’s common to follow a link containing a fragment (I.e. linking to a heading on the page) and then scroll around that page. As such, there’s no guarantee that the initial context (the heading) is the context you’re now in and wanting to make a link to.
Also worth noting that fragments are not sent to the server but are evaluated by the browser. As such there’s the potential for edge cases where confidential information that relies on this local only data could be leaked by hook if it included fragments. I think that’s highly unlikely, but something to be aware of.
I came here looking for the same thing. I’m working with a kanban board where each card has a fragment url, and I’d like to link each card to different things.