-
Notifications
You must be signed in to change notification settings - Fork 100
Open
Description
I have read with interest the documentation on the new feature of incorporating assets (e.g. images)
- https://ocaml.org/p/odoc/3.1.0/doc/odoc_for_authors.html#media (plus the bit about installing files with dune: https://ocaml.org/p/odoc/3.1.0/doc/odoc_for_authors.html#quickstart)
- Bigger documentation: Odoc 3.0 Planning: Assets and medias in odoc #1113
I am sorry to report that I was unable to make it work in any possible combination and any possible interpretation of the documentation.
Here is what my attempt looks like:
/tmp/odoc-example/asset-example/doc$ ls
dune image.png index.mld
/tmp/odoc-example/asset-example/doc$ cat index.mld
{0 heading}
Example text
{{image!image.png}Alt text}
/tmp/odoc-example/asset-example/doc$ cat dune
(documentation)
(install
(section doc)
(files (image.png as odoc-pages/image.png)))
/tmp/odoc-example/asset-example/doc$ cd ..
/tmp/odoc-example/asset-example$ dune build @doc
File "../../../../doc/index.mld", line 5, characters 0-27:
Warning: Failed to resolve reference ./image.png Path 'image.png' not found
/tmp/odoc-example/asset-example$ odoc --version
3.1.0
At this point I have no clue what might be wrong and what I might have missed from the documentation. Do you see any obvious problem with my attempt? Or maybe could you please share a minimal working example from which I will investigate further?
Metadata
Metadata
Assignees
Labels
No labels