Skip to content

feat: use output from new doc-ci with odoc 3 features in the package documentation area #3124

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

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

panglesd
Copy link
Contributor

@panglesd panglesd commented May 21, 2025

Replaces #3123, but PR is on main.

This PR uses the output from the new doc-ci @jonludlam has been working on. The docs are built with odoc 3, benefiting from several features, some of them that were previously "emulated" on this repo (such as a global sidebar).

This currently implements:

  • A global sidebar as computed by odoc 3
  • Better breadcrumbs
  • Source code pages
  • Redirections for url changes

This PR is not yet complete, however all pushed commits can already be reviewed, so I think it was already worth opening.
I tried to make the commits as atomic as possible to ease the review, which can then be made "commit by commit". All commits compile, although they may fail at runtime (eg due to wrong format for deserializing).

I'll post updates and warn when I consider the PR complete!

panglesd and others added 2 commits May 21, 2025 11:04
panglesd and others added 4 commits May 21, 2025 14:47
It was added in ocaml/odoc#1314 and needs not be ignored

Co-authored-by: Jon Ludlam <[email protected]>
@panglesd panglesd force-pushed the odoc-3.0-reworked branch from 62e8c97 to 9a5f418 Compare May 21, 2025 12:47
panglesd and others added 9 commits May 21, 2025 15:04
Co-authored-by: Jon Ludlam <[email protected]>
Odoc 3 allows to have breadcrumbs without href. Currently, the breadcrumbs are
still computed by ocaml.org, but soon it will be taken from odoc3's json output.

Co-authored-by: Jon Ludlam <[email protected]>
With odoc 3 and hierarchical documentation, breadcrumbs will include pages.

They are rendered with `/` between them (while other components are rendered
with `.` between them). So We can have `library1/Module.Submodule`.

Pages cannot yet happen since we still compute breadcrumbs ourselves.

Co-authored-by: Jon Ludlam <[email protected]>
@panglesd panglesd force-pushed the odoc-3.0-reworked branch from 9a5f418 to 62d32b9 Compare May 21, 2025 13:04
From https://alpinejs.dev/directives/cloak :

> Sometimes, when you're using AlpineJS for a part of your template, there is a
> "blip" where you might see your uninitialized template after the page loads,
> but before Alpine loads.
>
> `x-cloak` addresses this scenario by hiding the element it's attached to until
> Alpine is fully loaded on the page.
>
> For `x-cloak` to work however, you must add the following CSS to the page.
>
> ```
> [x-cloak] { display: none !important; }
> ```
@sabine sabine marked this pull request as draft May 26, 2025 10:20
@sabine
Copy link
Collaborator

sabine commented May 26, 2025

I converted this to a draft, but feel free to ping me any time when it makes sense to test this. I will put this on https://staging.ocaml.org, and hook it up with the staging docs-ci.

@sabine sabine changed the title Documentation: use output from new doc-ci with odoc 3 features Package Documentation Area: use output from new doc-ci with odoc 3 features May 26, 2025
@sabine sabine changed the title Package Documentation Area: use output from new doc-ci with odoc 3 features feat: use output from new doc-ci with odoc 3 features in the package documentation area May 26, 2025
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

Successfully merging this pull request may close these issues.

2 participants