Skip to content

Suggestion: the jsr.io site URLs should better reflect the module specifier #635

@jollytoad

Description

@jollytoad

Linking into JSR and between packages atm is a bit finickity with it's obscure URL scheme (of <package>/doc/<module>/~)

I'd expect to be able to link directly to a module within a package using a simple URL that reflects the jsr: module specifier.

For example: https://jsr.io/@std/http/file-server - current returns a 404, but it'd be much more helpful esp when linked from other docs/site if it were to redirect to https://jsr.io/@std/http/doc/file-server/~

Or even ditch the /doc/<module>/~ route, why bother having the /doc path, and why does the ~ even need to be there? it's cumbersome, and gets cut-off by the markdown URL parser!

Similarly an exact version, eg: https://jsr.io/@std/http@0.224.0/file-server -> https://jsr.io/@std/http@0.224.0/doc/file-server/~

And a fuzzy version could also redirect to the latest it would resolve to, eg: https://jsr.io/@std/http@^0.224.0 -> https://jsr.io/@std/http@0.224.5 and https://jsr.io/@std/http@^0.224.0/file-server -> https://jsr.io/@std/http@0.224.5/doc/file-server/~ (this currently gives a malformed request, I don't see why it couldn't be more helpful and just redirect as I describe)

Metadata

Metadata

Assignees

No one assigned

    Labels

    docs genRelated to the documentation generation

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions