haskell / hackage-server

Hackage-Server: A Haskell Package Repository
http://hackage.haskell.org
Other
415 stars 198 forks source link

Make it possible to put images in package description field. #1180

Open amano-kenji opened 1 year ago

amano-kenji commented 1 year ago

Module documentations can show images in extra-doc-files field on local haddock documentation and hackage.

Package description on local haddock documentation can show images in extra-doc-files.

Package description on hackage can't show images in extra-doc-files.

andreasabel commented 1 year ago

You can put images in README.md and include it via extra-doc-files: README.md. Would that solve your issue?

amano-kenji commented 1 year ago

Not exactly. I don't like showing README.md on hackage.

ulysses4ever commented 1 year ago

It's weird that local haddock and Hackage behave differently:

Package description on local haddock documentation can show images in extra-doc-files.

Package description on hackage can't show images in extra-doc-files.

I think the feature request here makes sense and is desirable.

gbaz commented 1 year ago

To be clear, you can put images in descriptions. Cf. https://hackage.haskell.org/package/lens

The issue is that relative links don't point to where one would hope. I think a PR could be made that specifically changed the relative path for relative links in that portion...