Tags: recursion-schemes/recursion-schemes
Tags
hack to display the flowchart on hackage
The readme is stored at "<repo>/README.md", while the image is stored at
"<repo>/docs/flowchart.svg", next to "<repo>/src" etc.
But hackage serves the readme at "<package_url>", while it serves the
rest of the documentation at "<package_url>/docs", and thus the image is
served at "<package_url>/docs/docs/flowchart.svg", next to
"<package_url>/docs/src" etc.
This is a problem because the image uses a relative path, but that path
is different on github ("./docs/flowchart.svg") than on hackage
("./docs/docs/flowchart.svg"). So regardless of which relative path I
use, the image will be visible from one location and will 404 from the
other location.
This commit hacks around the problem by including _two_ images in the
README, one with each path. In each case, one image will be visible,
while the other will 404. On hackage, the missing image is simply a
blank spot on the page, so this looks good. Let's see what this looks
like on github.
Fix warning in cabal file Co-authored-by: Samuel Gélineau <[email protected]>
PreviousNext