Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow relative urls? #1126

Open
KiaraGrouwstra opened this issue Feb 1, 2020 · 6 comments
Open

allow relative urls? #1126

KiaraGrouwstra opened this issue Feb 1, 2020 · 6 comments

Comments

@KiaraGrouwstra
Copy link

I would like to host my Haddock documentation for others to see without having to publish to Hackage (as I'm not building a library), and figured perhaps I could publish to Github Pages.
However, I found that Haddock generates absolute URLs based on the local location of the documentation folder on the system the docs were generated on.
When moving or deploying the /doc/ folder anywhere else, such links would break.
Is there some command-line option that might allow specifying the desired behavior here?

@expipiplus1
Copy link

@tycho01 Did you ever come up with a good solution for building documentation for publishing anywhere but hackage?

@KiaraGrouwstra
Copy link
Author

@expipiplus1

Did you ever come up with a good solution for building documentation for publishing anywhere but hackage?

unfortunately, not yet. 😕

@expipiplus1
Copy link

@tycho01 stack seems to generate docs with relative haddocks, although these don't link to hackage/stackage docs for external dependencies. If your dependency tree is small enough you could consider just uploading the whole thing...

@KiaraGrouwstra
Copy link
Author

@expipiplus1 yeah, I did -- I don't super care whether it's including the docs for dependencies or would instead link to their Hackage versions. it's just that even the documentation for my own stuff just breaks as soon as it's moved/served due to the static links based on the location the docs were generated in.

@KiaraGrouwstra
Copy link
Author

fwiw there are presently work-arounds.

@expipiplus1
Copy link

expipiplus1 commented May 18, 2020

I made a similar script here: https://github.com/expipiplus1/vulkan/blob/master/gen-standalone-haddocks.sh It generates documentation with stack, copies what's needed to another directory and them fixes links. Example documentation here: http://expipiplus1.github.io/vulkan/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants