Giter VIP home page Giter VIP logo

Comments (1)

RyanGlScott avatar RyanGlScott commented on June 1, 2024

Hm. If you build the Haddocks locally, then the link does work. The reason that it doesn't work on Hackage is because the link is here:

https://hackage.haskell.org/package/lens-5.2/src/images/Hierarchy.png

Instead of here:

https://hackage.haskell.org/package/lens-5.2/images/Hierarchy.png

Notice the additional src/ subdirectory in the first URL. You might think that you could fix the issue by changing the link to the local copy like so:

diff --git a/lens.cabal b/lens.cabal
index 6acf6115..5bf54a47 100644
--- a/lens.cabal
+++ b/lens.cabal
@@ -50,7 +50,7 @@ description:
   .
   <<http://i.imgur.com/ALlbPRa.png>>
   .
-  <images/Hierarchy.png (Local Copy)>
+  <src/images/Hierarchy.png (Local Copy)>
   .
   You can compose any two elements of the hierarchy above using @(.)@ from the @Prelude@, and you can
   use any element of the hierarchy as any type it linked to above it.

But then the link will be broken if you build the Haddocks locally! Ugh.


Now that I look a little more closely, we've encountered this same issue in ekmett/semigroupoids#123. We were unable to figure out a consistent way to link to local images in Haddock and have it still work on Hackage, so we resorted to linking to a copy of the image on GitHub. This does work regardless of whether you view the Haddocks locally or on Hackage, but it's arguably not a "local" copy anymore.

In the absence of a better solution, I think we should just link to GitHub.

from lens.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.