ndmitchell / ndmitchell/hoogle

Local file URLs don't respect the `--cdn` prefix

Open
#374 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Haskell
Stars
803
Forks
152
PR merge metrics
No merged PRs in 30d

Description

This is a follow-on issue from #239.

Maybe I'm misunderstanding the usage of the CLI flags, but here's my use-case:

  1. I'm serving Hoogle under a subpath, my.domain/hoogle/ (using a proxy) - so I set the --cdn flag to define the URL prefix.
  2. I'm serving locally-generated documentation with --local, so there are links to files in my Haddocks.
  3. Under certain circumstances (typically links across different packages), these links are not relative - so they are fully qualified file:// links, which Hoogle replaces with /file/, thanks to the above PR.
  4. However, these files should be under /hoogle/file/, rather than /file/, because of the above --cdn setting.

Is this a supported use-case, or should I instead be using the workflow that avoids --local?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review follow-on issue #239 and reproduce the described CLI setup using --cdn, --local, a proxy subpath, and cross-package Haddock links. Trace where file:// links become /file/ and determine whether the completed behavior should prefix those links with the configured CDN path.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.