denoland / dotland

[Archived] deno.land website
https://deno.land
MIT License
957 stars 626 forks source link

deno-gfm should load typescript on all deno.land/x pages #2653

Closed andykais closed 1 year ago

andykais commented 1 year ago

I originally posted this upstream in deno-gfm https://github.com/denoland/deno-gfm/issues/29. To summarize, the deno.land/x pages do not support typescript code blocks in their README markdown. This leaves tons of pages without syntax highlighting. My library as an example: https://deno.land/x/torm@1.0.2. This is the default behavior in deno-gfm, which is understandable if this is a generic github markdown formatter.

In the README it states:

By default syntax highlighting for JavaScript, Markdown, and HTML is included. You can include more languages importing them.

For deno libraries though, at least typescript should be part of the default loaded languages, considering deno is a 'typescript first' runtime. Ideally, any code blocks with a language tag should be dynamically loaded at render-time. I can see this being a more difficult ask though, if memory constraints are high, or if caching dynamic loaded syntax is difficult.

crowlKats commented 1 year ago

There is no need for dynamically loading. We already load a plethora of prism languages, so that gfm issue is still valid and needs investigation.

lino-levan commented 1 year ago

https://github.com/denoland/dotland/pull/2659 seems to have fixed this issue. Should this be closed?

andykais commented 1 year ago

👍 thank you so much!