jsr icon indicating copy to clipboard operation
jsr copied to clipboard

How to pass `deno doc` flags to JSR, or have JSR link to my own docs?

Open gadicc opened this issue 4 months ago • 4 comments

deno doc has some useful looking options:

Documentation options:
      --category-docs=<category-docs>              Path to a JSON file keyed by category and an optional value of a markdown doc
      --default-symbol-map=<default-symbol-map>    Uses the provided mapping of default name to wanted name for usage blocks
      --filter <filter>                            Dot separated path to symbol
      --name=<name>                                The name that will be used in the docs (ie for breadcrumbs)
      --private                                    Output private documentation
      --strip-trailing-html                        Remove trailing .html from various links. Will still generate files with a .html extension
      --symbol-redirect-map=<symbol-redirect-map>  Path to a JSON file keyed by file, with an inner map of symbol to an external link

Is there any way to have these options used by the JSR doc generation (via e.g. something in deno.json), or if I want to use these options, do I need to build and host my own docs? In the case of the latter, how can I then have the docs link on JSR point to my own docs instead?

Thanks :)

gadicc avatar Aug 19 '25 12:08 gadicc

there is no way to set these options; you would have to hsot yourself. and no, there is no way on JSR to link to different docs, especially since a lot of capabilities would then be lost.

what capabilities from those otpions look interesting to you?

crowlKats avatar Aug 20 '25 16:08 crowlKats

Thanks for the quick response, @crowlKats. Greatly appreciated.

They all look interesting, I guess notably --categories and --default-symbol-map. Although to be honest, I was mostly just checking the cost of using these features before doing so, and for now, think I'll manage with just what is built in to jsr.io 😅

gadicc avatar Aug 21 '25 09:08 gadicc

we are planning to add categories to JSR itself, but it requires a bit of engineering work.

crowlKats avatar Aug 21 '25 09:08 crowlKats

Copy that. Thanks!

gadicc avatar Aug 21 '25 10:08 gadicc