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

Further voodoo #1252

Merged
merged 8 commits into from
Dec 18, 2024
Merged

Further voodoo #1252

merged 8 commits into from
Dec 18, 2024

Conversation

jonludlam
Copy link
Member

Minor changes for voodoo mode

@jonludlam jonludlam added the no changelog This pull request does not need a changelog entry label Nov 21, 2024
@jonludlam jonludlam force-pushed the further-voodoo branch 6 times, most recently from 2d69c2c to 0114e3f Compare December 14, 2024 14:53
Copy link
Collaborator

@Julow Julow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Comment on lines +283 to +285
Odoc.sidebar_generate
~output_file:Fpath.(output_dir // pkg_dir / "sidebar.json")
~json:true index.output_file ();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this json file used ? I find this code a bit brittle because if this file is ever needed somewhere else, nothing will ensure that it continues to be generated.
Any way the caller could set json = true ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used by ocaml.org - this is the sidebar json that served up for the per-package sidebar. The ocaml.org server reads this and renders its own sidebar.

@@ -222,6 +179,8 @@ let process_package pkg =
|> List.flatten
in
let libraries = meta_libraries @ non_meta_libraries in
let pkg_dir = top_dir pkg in
let doc_dir = Fpath.(pkg_dir / "doc") in
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc directory is back ? Is this to avoid breaking urls ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose not to change the layout on ocaml.org - mostly because it'd require a bunch of redesign work, and I don't have the capacity to do that.

@jonludlam jonludlam merged commit 147a8f1 into ocaml:master Dec 18, 2024
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog This pull request does not need a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants