observablehq / feedback

Customer submitted bugs and feature requests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Link behaviors when embedding or downloading notebooks

shadoof opened this issue · comments

Is your feature request related to a problem? Please describe.
Markdown-heavy notebooks that I am embedding have links within the notebooks themselves in Markdown of the form: [linkedText](#namedCell). Observable’s iFrame embedding "expands" all such relative href links and makes them absolute, prefixing https://observablehq.com/@ etc. to #namedCell. Thus – this is the undesirable behavior – they are no longer document-internal.

The behavior of entire-notebook downloading or embedding with Runtime with JavaScript is different. This non-consistency is also, I think, undesirable.

Describe the solution you'd like

  • An option when iFrame embedding for entire notebooks to retain all relative links as such, including relative links to notebooks owned by the same account, Markdown form: [linkedText](notebookName) (no hash character).
  • Allow conventional internal links, Markdown coded like this: from: [linkText](#andTarget) to: <a id="aname"> to work within Observable when, currently, they do not.

Describe alternatives you've considered
Because the facility to Markdown code: [linkedText](#namedCell) is so sweet, I am currently experiment with coding internal links both ways so that internal links (may?) work in both contexts: 1) in Observable and 2) when Runtime with Javascript embedded. (I can't, myself, do anything about iFrame embedding.)

Additional context
I was kindly given technical background to the problems by @mootari in this forum discussion, which may help: https://talk.observablehq.com/t/links-when-embedding-notebooks/8311