You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: use output from new doc-ci with odoc 3 features in the package documentation area (#3124)
* Get docs from new docs CI
Co-authored-by: Jon Ludlam <jon@recoil.org>
* Docs: Update to new odoc3 json format
Co-authored-by: Jon Ludlam <jon@recoil.org>
* Docs: use new `status.json` from odoc 3
Co-authored-by: Jon Ludlam <jon@recoil.org>
* Docs: use header field
It was added in ocaml/odoc#1314 and needs not be ignored
Co-authored-by: Jon Ludlam <jon@recoil.org>
* Docs: fix search script location change with odoc_driver
Co-authored-by: Jon Ludlam <jon@recoil.org>
* Docs: fix search results' url
Co-authored-by: Jon Ludlam <jon@recoil.org>
* Docs: compute sidebar from toc json
Co-authored-by: Jon Ludlam <jon@recoil.org>
* Docs: do not reload global toc on toc click
Co-authored-by: Jon Ludlam <jon@recoil.org>
* Docs: uniformize toc look
Co-authored-by: Jon Ludlam <jon@recoil.org>
* Docs: small refactor of breadcrumbs
Co-authored-by: Jon Ludlam <jon@recoil.org>
* Docs: allow breadcrumbs without href
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 <jon@recoil.org>
* Docs breadcrumbs: Adding `page` kind
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 <jon@recoil.org>
* rename `library_path` to `path`: pages also have/are in breadcrumbs
Co-authored-by: Jon Ludlam <jon@recoil.org>
* Docs breadcrumbs: use the one computed by odoc without processing
Co-authored-by: Jon Ludlam <jon@recoil.org>
* Add dependency on ppx_deriving_yojson
* Docs: hide toc until alpine has loaded
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; }
> ```
* Add source pages to docs
* Render html in breadcrumbs
* Add style for rendered source code
* Handle redirection
Since odoc 3, and the replacement of voodoo by odoc_driver as the odoc driver,
the layout for docs has changed. Since we do not want to break previously
existing links, we redirect the old layout to the new one.
* Sidebar: open sub-toc when clicking on a page from the sidebar
* Doc: handle asset loading
Documentation assets are not present as json files. Therefore, if we do not find
a .json target, we try to load it as an asset.
This is not ideal: assets always require two requests to the documentation
server. 404 pages also trigger two requests...
* Fix package files' links
* Fix package files appearing in global toc
* Fix theme for source rendering
* Revert keeping the sidebar on new page loading
* Finally implement avoid reloading sidebar
* Docs: Improve source code target highlighting
* Improve css of source rendering line numbers
* Improve links to source style
* Docs: only show right sidebar when it exists
* Improve error handling for status.json
* Fix enter on search result
Odoc 3's search has already a leading `/`.
* Fix redirection on edge cases
`old_path` and `new_path` do not include the prefix, which makes the detection
of redirection harder.
Previously, the url `/p/odoc/3.0.0/doc/odoc.odoc/Odoc_odoc/Sidebar/index.html`
would trigger the rewriting:
`doc/Odoc_odoc/Sidebar/index.html`
->
`doc/odoc.odoc/Odoc_odoc/Sidebar/index.html`
which is a bug. Adding a / in the rewriting rules solves it
* Put documentation-related code in a documentation file
* Consider non-html files as assets
* Turn sidebar into Navmap earlier
* Increment cache version and update comments around it
---------
Co-authored-by: Jon Ludlam <jon@recoil.org>
0 commit comments