panglesd
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Odoc 3 announcement to discuss On behalf of the odoc team, I'm thrilled the announce the release of odoc 3.0.0 beta 1. This release has been cooking for a long time - it's been more than a year since odoc 2.4 landed, and a huge amount of work has gone into this. Thanks to the many others who contributed, either by code or by comments: @juloo, @panglesd, @EmileTrotignon, @gpetiot, @trefis, @sabine, @dbuenzli, @yawaramin, and more. With this release we're including a driver that knows how to use all of the exciting new features of odoc. This driver has been used to create the [docs site for the various odoc tools](https://ocaml.github.io/odoc/). Here are a selected set of features: - :droplet: Rendered source! Jump from any item in the documentation straight to its rendered source; no matter how much of OCaml's complex module system you are using. - :mag: Search by type! Our detective sherlodoc will find your lost value given its type. - :warning: Convenient warnings! Warnings are now clearly visible and useful, no longer buried among your dependencies’ warnings. - :arrow_heading_up: Self host your documentation, but [link to ocaml.org](https://ocaml.github.io/odoc/odoc-driver/#remapping-dependencies) for your dependencies. - :100: More sidebars! Odoc 3 features a [global sidebar](https://ocaml.github.io/odoc/odoc/odoc_for_authors.html#page-tags), allowing you to discover the most hidden corner of underground documentation. - :exploding_head: Image support! This cutting-edge feature now allows you to [add images](https://ocaml.github.io/odoc/odoc/odoc_for_authors.html#media) to your documentation. Video and audio come for free. - :spider_web: [Fully cross-package links](https://ocaml.github.io/odoc/odoc/odoc_for_authors.html#links_and_references)! The OCaml docs are now a true spider web. Prepare to catch bugs, and eat them. - :cop: Hierarchical documentation pages! We use a modular language. We don't want a flat namespace for pages. - :building_construction: The build dependencies are friendlier with incremental build systems, allowing better shared build caches. - :heart: Quality of life improvements! Many improvements have been piling up since we started odoc 3. For instance: `Add clock emoji before @since tag (@yawaramin, #1089)`! More explanation of these features is available at the odoc site, where we have documentation [for authors](https://ocaml.github.io/odoc/odoc/odoc_for_authors.html), for [users of `odoc_driver`](https://ocaml.github.io/odoc/odoc-driver/index.html), a [cheatsheet](https://ocaml.github.io/odoc/odoc/cheatsheet.html), and [differences from ocamldoc](https://ocaml.github.io/odoc/odoc/ocamldoc_differences.html). ## How can you help? We need your feedback, both as authors and as users of documentation! Try things out using the new driver: ```shell $ opam install odoc-driver # don't forget to `opam update` $ odoc_driver <package list> # For instance: `$ odoc_driver brr odoc` $ $YOUR_BROWSER _html/index.html ``` Many of those features' implementations are not set in stone, but first versions. Please leave comments, either in this thread or as issues in the repository. So, navigate already written documentation, and update your own docs to use the new features! --- Documentation links: - Hierarchical pages: missing? - Sidebar ordering: https://ocaml.github.io/odoc/odoc/odoc_for_authors.html#page-tags - Image support: https://ocaml.github.io/odoc/odoc/odoc_for_authors.html#media and unfortunately no `(install ...)` example link - Cross package links: - for config file: syntax https://ocaml.github.io/odoc/odoc/odoc_for_authors.html#config-file and for install https://ocaml.github.io/odoc/odoc/odoc_for_authors.html#quickstart - For reference syntax: https://ocaml.github.io/odoc/odoc/odoc_for_authors.html#links_and_references - `--remap`: https://ocaml.github.io/odoc/odoc-driver/index.html#remapping-dependencies --- The odoc team is releasing a beta version of its third major version! It took a lot of time and work, but we are finally close. Last "minor" release was more than one year ago, so it's a relief to finally bring all contributions to the public! Thanks to the many who contributed, either by code or by comments: @jonludlam, @juloo, @panglesd, @EmileTrotignon, @gpetiot, @trefis, @sabine, @dbuenzli, @yawaramin, ... This release contains a lot of new features, but many need special support from the driver: for instance, they require special CLI flags. As a consequence, the usual drivers for odoc (`odig`, `dune`, the `voodoo` driver for ocaml.org) won't enable them out of the box. The good news is that `odoc` 3 is still compatible with those drivers. To keep a driver in sync with the addition of new features, the `odoc` team now maintains its own (experimental) driver, in the same repository. You can use it to test the new features! ```shell $ opam install odoc-driver # don't forget to `opam update` $ odoc_driver <package list> # For instance: `$ odoc_driver brr odoc` $ $YOUR_BROWSER _html/index.html ``` Note well that however, this driver is meant to be used to test odoc. It is not a replacement for `dune` or `odig`, which will hopefully be extended to support odoc 3. Here are a selected set of features, with more explanation below: - :100: More sidebars! Odoc 3 features a global sidebar, allowing you to discover the most hidden corner of underground documentation. - :exploding_head: Image support! This cutting-edge feature allows you to add images to your documentation - no less. Video and audio come for free. - :droplet: Rendered source! Jump from any item in the documentation straight to its rendered source; no matter how much of OCaml's complex module system you are using. - :spider_web: Cross package links! The OCaml docs are now a true spider web. Prepare to catch bugs, and eat them. - :cop: Hierarchical documentation! We use a modular language. We don't want a flat namespace for pages. - :warning: Convenient warnings! Warnings are now clearly visible and useful, no longer buried among your dependencies’ warnings. - :mag: Search by type! Our detective sherlodoc will find your lost value given its type. - :building_construction: The build dependencies are friendlier with incremental build systems, allowing better shared build caches. - :heart: Quality of life improvements! Many improvements have been piling up since we started odoc 3. For instance: `Add clock emoji before @since tag (@yawaramin, #1089)`! - :arrow_heading_up: Self host your documentation, but link to ocaml.org for your dependencies. - :package: Odoc gives its driver better support for separating modules by library, fixing previously ambiguous links. We need your feedback, as users and authors of documentation! While we hope the CLI won't change anymore, many of those features' implementation are not set in stone, but first versions. So, leave comments, either in this thread or as issues in the repository. So, navigate already written documentation, and update them to use the new features! <details> <summary>More details on the points above.</summary> Some things come for free (eg, rendered source), some others need support from you (eg, ordering the sidebar). I detail below the how you can use some of the new features! ### Hierarchical documentation All pages installed in `<opam-root>/doc/odoc-pages/` will be picked by the driver, will be placed in the hierarchy with respect to the subfolder they are in. So the `<opam-root>/doc/odoc-pages/usecases/web.mld` will be rendered in a `usecase` folder. However, dune install mld pages flatly. You need to use an install stanza: ``` (install (section doc) (files (web.mld as odoc-pages/usecases/web.mld))) ``` Check out an [example](https://github.com/ocaml/odoc/blob/master/doc/deprecated/dune) of this on odoc's doc! ### Ordering the sidebar The ordering the pages in the sidebar is done through a tag to put at the beginning of your `index.mld` page: ``` @children_order intro quick_start hard_stuff ``` For an example see how `odoc` [uses it](https://github.com/ocaml/odoc/blob/master/doc/odoc.mld#L1)! ### Image support To include an image in your doc, you need to install it in the right opam directory first. In `dune`: ``` (install (section doc) (files (logo.png as odoc-pages/logo.png))) ``` Then, in an mld file, use the `{image!...}` reference: ``` {i Finally}, image support! {image!logo.png} ``` Check out an example of this in `odoc`'s [dune file](https://github.com/ocaml/odoc/blob/master/doc/dune#L51) and [documentation](https://github.com/ocaml/odoc/blob/master/doc/cheatsheet.mld#L176)! ### Cross package linking If you want to reference a page from one package to another, use the `{!/pkgname/pagename}` syntax: ``` See {!/brr/ffi_manual} for how these bindings were designed. ``` You can reference any other package or library, even if they depend on you, without circular dependency! However, you need to declare which library/package you want to include, in a config file named `odoc-config.sexp`: ``` (libraries ...) (packages ...) ``` that you need to install ``` (install (files odoc-config.sexp) (section doc)) ``` Check out `odoc`'s [config file](https://github.com/ocaml/odoc/blob/master/doc/odoc-config.sexp), [how it's installed](https://github.com/ocaml/odoc/blob/master/doc/odoc-config.sexp) and the [cross references](https://github.com/ocaml/odoc/blob/master/doc/cheatsheet.mld#L81) in the cheatsheet! (Note that you'll need to explicitly mention that you need the docs that you are referencing: `odoc_driver -p yourpackage -p brr`. This caveat will soon be fixed.) ### Convenient warnings Whenever you build your docs for a specific package, the dependencies' warnings won't be shown to you. So in: ``` odoc_driver opam yourpackage ``` all warnings shown to you should be actionable, go fix them! ### Host your package documentation If you want to host your package documentation, simply use the `--remap` argument! The driver will still build all doc in order to check that links are valid, but it will only generate the html files for the selected packages, not the dependencies. Links to the dependencies will be redirected to ocaml.org. </details> ### How you can help! We need feedback! The best way to help is to try out `odoc_driver` on some packages and let us know if there's anything that looks wrong or broken or just could be improved. ### Next steps We are aware of a few bugs, that are not blockers but that we need to fix. - Rendered source have limitation (source needs to be installed which is not always the case, works on preprocessed source, ...) https://github.com/ocaml/odoc/issues/1289 https://github.com/ocaml/odoc/issues/1288 - Sometimes rendered source features do not work well, in particular jump to def (see https://github.com/ocaml/odoc/issues/1287) - Dependency warnings may slip through (TODO: needs example to open issue) - Image's size cannot be defined https://github.com/ocaml/odoc/issues/1286 The next step for us is to replace `voodoo` with `odoc_driver` to generate the docs for ocaml.org, making OCaml users benefit from all new features without any action from their part. The next-next step is to rewrite `dune build @doc` rules to replace `odoc_driver`. <!-- --- # Odoc 3 announcement to Tarides We are already at the end of the year, and the holiday season is coming. Families are gathering to prepare the celebrations. The leprechauns (@jules, @jon and me) have been working hard to make it happen, but might not be able to say "It is born, the divine odoc" the 24th night. However, despair no more! As you are dear to us, we want to give you a preview of what will come soon to everyone! - :100: More sidebars! Odoc 3 features a global sidebar, allowing you to discover the most hidden corner of underground documentation. - :exploding_head: Image support! This cutting-edge feature allows you to add images to your documentation - no less. Video and audio come for free. - :droplet: Rendered source! Jump from any item in the documentation straight to its rendered source; no matter you much of OCaml's complex module system you are using. - :spider_web: Cross package links! The OCaml docs are now a true spider web. Prepare to catch bugs, and eat them. - :cop: Hierarchical documentation! We use a modular language. We don't want a flat namespace for pages. - :warning: Convenient warnings! Warnings are now clearly visible and useful, no longer buried among your dependencies’ warnings. - :mag: Search by type! Our detective sherlodoc will find your lost value given its type. - :building_construction: Incremental build! The build dependencies are finally friendly with incremental build systems. - :heart: Quality of life improvements! Many improvements have been piling up since we started odoc 3. For instance: `Add clock emoji before @since tag (@yawaramin, #1089)`! We (the leprechauns) want you to try it out! If you do so, you will even be gifted a nice audio surprise. See how in the thread! ## (In the thread) In order to play with odoc 3, currently you'll just need to pin a few packages: ```shell $ opam pin add git+https://github.com/ocaml/odoc ``` As there is no `odoc.3.0` support in `dune` currently, so you need to build your docs using our driver, `odoc_driver`. This driver, like `odig`, builds the docs for your `opam` package. It has some rough edges, but it knows how to enable the new features. Just call `odoc_driver` on a package you want to test, and open the result: ```shell $ odoc_driver opam -p odoc $ firefox _html/odoc/index.html ``` The promised audio surprise gift is there for you :smile: Great! Some things come for free (eg, rendered source), some others need support from you (eg, ordering the sidebar). I detail below the how you can use some of the new features! ### Ordering the sidebar The ordering the pages in the sidebar is done through a tag to put at the beginning of your `index.mld` page: ``` @children_order intro quick_start hard_stuff ``` For an example see how `odoc` [uses it](https://github.com/ocaml/odoc/blob/master/doc/odoc.mld#L1)! ### Image support To include an image in your doc, you need to install it in the right opam directory first. In `dune`: ``` (install (section doc) (files (logo.png as odoc-pages/logo.png))) ``` Then, in an mld file, use the `{image!...}` reference: ``` {i Finally}, image support! {image!logo.png} ``` Check out an example of this in `odoc`'s [dune file](https://github.com/ocaml/odoc/blob/master/doc/dune#L51) and [documentation](https://github.com/ocaml/odoc/blob/master/doc/cheatsheet.mld#L176)! ### Cross package linking If you want to reference a page from one package to another, use the `{!/pkgname/pagename}` syntax: ``` See {!/brr/ffi_manual} for how these bindings were designed. ``` You can reference any other package or library, even if they depend on you, without circular dependency! However, you need to declare which library/package you want to include, in a config file named `odoc-config.sexp`: ``` (libraries ...) (packages ...) ``` that you need to install ``` (install (files odoc-config.sexp) (section doc)) ``` Check out `odoc`'s [config file](https://github.com/ocaml/odoc/blob/master/doc/odoc-config.sexp), [how it's installed](https://github.com/ocaml/odoc/blob/master/doc/odoc-config.sexp) and the [cross references](https://github.com/ocaml/odoc/blob/master/doc/cheatsheet.mld#L81) in the cheatsheet! (Note that you'll need to explicitly mention that you need the docs that you are referencing: `odoc_driver -p yourpackage -p brr`. This caveat will soon be fixed.) ### Convenient warnings Whenever you build your docs for a specific package, the dependencies' warnings won't be shown to you. So in: ``` odoc_driver opam -p yourpackage ``` all warnings shown to you are actionable, go fix them! ### Next steps The next step for us is to replace `voodoo` with `odoc_driver` to generate the docs for ocaml.org, making it inherit all new features for free. Then, we will release `odoc.3.0.0~alpha`. The nexter step is to rewrite `dune build @doc` rules to replace `odoc_driver`. ## Report us any comment Please report us any comment! While I'll be on holidays, other leprechauns need your input! -->

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully