doc_website
doc_website copied to clipboard
Clicking on [src] in builtin types downloads the source file
Actual
On the documentation of builtin (https://doc.deno.land/builtin/stable), clicking [src] downloads the source file.
Expected
It should have opened the source code on GitHub with the pointed line highlighted.
@singla-shivam which src are you clicking?
If I click src for addEventListener it just takes me to the page https://doc-proxy.deno.dev/builtin/stable#L5802 without downloading.
probably this was fixed by https://github.com/denoland/doc_website/pull/183
It used to point to https://github.com/denoland/deno/releases/download/v1.11.2/lib.deno.d.ts and it has content-type: application/octet-stream which causes the downloading of the file.
It would be a better experience if it pointed to the actual source code on the repository (not sure if this is possible) with working line fragments (#L).
The doc (e.g. https://doc-proxy.deno.dev/builtin/stable ) is generated from multiple source files. So it's not easily possible to point the line in the source file. But the doc page is generated by this Deploy script https://github.com/denoland/doc_website/blob/main/deploy/main.ts So probably we can enhance this output to make #L hash work.
@singla-shivam which src are you clicking?
@GuiltyDolphin It used to download the source file. But as mentioned by @kt3k, it is fixed now.