-
Notifications
You must be signed in to change notification settings - Fork 292
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
Serve OCaml Compiler Manuals #2150
Conversation
src/ocamlorg_web/lib/redirection.ml
Outdated
@@ -449,6 +449,25 @@ let from_v2 = | |||
("/releases/latest/api/index.html", Url.api_with_version latest_version); | |||
] | |||
|
|||
let default_index_html = | |||
[ | |||
("/manual", Url.manual_lang latest_version); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need to add one for latest
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need a redirect for latest
, we need to serve this via Dream under /manual/latest
. A redirect would mean that the URL in the browser would change to the specific version.
Using the following on the upstream git grep -ho 'href=\"https://[._a-z0-9/\-]*' | sort -u I found the following hardcoded urls:
All but the first two trampolines to v2. We should all turn them into relative links. |
The changes I'm proposing to handle api urls are in this branch: https://github.com/ocaml/ocaml.org/tree/html-compiler-manuals-api |
@cuihtlauac I don't see a reason why we should introduce a config variable |
That allows developers to put their local copy of |
I have added @cuihtlauac latest commit to this PR and included a commit to update line 50 of
@shakthimaan I note that |
The search_icon.svg has been added to the respective api/ folders. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, on staging this seems to work fine
Thanks a lot for the hard work on integrating the reference manual ! |
Dockerfile
. TheRUN
line determines which branches exist and clones them all into local directories:/manual/4.14
,/manual/5.0
, etc; updating this is unnecessary when a new version is released./manual
and below from the local filesystemindex.html
when the directory is requested/manual
to serve from these files rather than redirect to v2.ocaml.org