observablehq / feedback

Customer submitted bugs and feature requests
42 stars 3 forks source link

Link behaviors when embedding or downloading notebooks #597

Open shadoof opened 9 months ago

shadoof commented 9 months ago

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

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