Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a small experiment for what could be the first version of docs (not counting existing
example
folder, which served its purpose, but I think can be retired now 😅 ).This experiment is using docsify with some updates. I really liked docsify for a few reasons:
python -m SimpleHTTPServer
,docsify-cli
or any other server)Some more things:
Embed
.ml
filesThrough a tiny change in docsify, there is the possibility to embed
ml
files partially, only the part between comments with(* [demo] *)
in them.This allows to have the doc snippets compiled with dune (including ppx, etc) very easily, apply ocamlformat to them transparently too, and then use them in the docs directly, see docs/snippets/basic.ml and how it renders.
Embed html files from odoc
It is possible to embed html in docsify as well. This allows to produce some html with odoc, and then just copy the content to the
docs
folder to be shown with the rest of the docs, see example.One question here is if we will be able to put all the docs at the top level component (
React
) because otherwise I don't think the embedding will work, as it'll be very hard to maintain (one has to reproduce the hierarchy of odoc manually in docsify). This is probably the part that makes me hesitate more.Docs initial structure
I added as well some initial structure for the docs (more details about subsections in link below):
The example to see how all the above works can be seen in https://ml-in-barcelona.github.io/jsoo-react/docs/.
Let me know what you think :) any feedback welcome, about structure, choice of libs, embedding etc.