From f264b14280b341a750b9c94bfc8f09740dd25b95 Mon Sep 17 00:00:00 2001 From: Vincent Balat Date: Sat, 6 Jun 2026 12:25:33 +0200 Subject: [PATCH 1/2] Translate the tutorial manual from wikicreole to wodoc .mld Both versions (tutos/8.0, tutos/dev) translated in place with `wodoc convert --odoc-refs`, keeping the doc in the main branch (no wikidoc branch). The old .wiki sources are removed (recoverable from git history); menu.wiki is kept as the sidebar navigation source (parsed by gen-manual-nav.py, same as eliom). The themed site is built from these .mld by ocsigen.github.io's wodoc/tuto/ build.sh. Verified: content section headings identical to the live site on all pages (8.0 60/60, dev 61/61). --- .../{application.wiki => application.mld} | 886 ++++++++-------- .../{basics-server.wiki => basics-server.mld} | 592 ++++++----- tutos/8.0/manual/{basics.wiki => basics.mld} | 988 ++++++++++-------- .../{custom-conf.wiki => custom-conf.mld} | 26 +- .../{hash-password.wiki => hash-password.mld} | 12 +- ...te-a-cryptographically-safe-identifier.mld | 3 + ...e-a-cryptographically-safe-identifier.wiki | 3 - .../how-does-a-page-s-source-code-look.mld | 81 ++ .../how-does-a-page-s-source-code-look.wiki | 81 -- tutos/8.0/manual/how-to-add-a-div.mld | 25 + tutos/8.0/manual/how-to-add-a-div.wiki | 25 - tutos/8.0/manual/how-to-add-a-favicon.mld | 16 + tutos/8.0/manual/how-to-add-a-favicon.wiki | 16 - .../manual/how-to-add-a-javascript-script.mld | 30 + .../how-to-add-a-javascript-script.wiki | 30 - tutos/8.0/manual/how-to-add-a-list.mld | 70 ++ tutos/8.0/manual/how-to-add-a-list.wiki | 70 -- ...to-add-a-select-or-other-form-element.mld} | 26 +- tutos/8.0/manual/how-to-add-an-image.mld | 46 + tutos/8.0/manual/how-to-add-an-image.wiki | 46 - .../8.0/manual/how-to-add-css-stylesheet.mld | 45 + .../8.0/manual/how-to-add-css-stylesheet.wiki | 45 - ...o-attach-ocaml-values-to-dom-elements.mld} | 12 +- ...s-to-the-html-nodes-sent-to-the-client.mld | 3 + ...-to-the-html-nodes-sent-to-the-client.wiki | 3 - tutos/8.0/manual/how-to-build-js-object.mld | 13 + tutos/8.0/manual/how-to-build-js-object.wiki | 13 - ...server-side-function-from-client-side.mld} | 28 +- ...to-call-an-ocaml-function-from-js-code.mld | 3 + ...o-call-an-ocaml-function-from-js-code.wiki | 3 - ...ki => how-to-compile-my-ocsigen-pages.mld} | 28 +- ...onfigure-and-launch-the-ocsigen-server.mld | 23 + ...nfigure-and-launch-the-ocsigen-server.wiki | 23 - ...ding-on-data-entered-on-previous-ones.mld} | 6 +- ...a-current-page-without-knowing-its-url.mld | 11 + ...-current-page-without-knowing-its-url.wiki | 11 - ...> how-to-detect-channel-disconnection.mld} | 26 +- ...-side-state-for-the-process-is-closed.mld} | 8 +- ...iki => how-to-do-links-to-other-pages.mld} | 6 +- ...ow-to-implement-a-notification-system.mld} | 63 +- ...belonging-to-a-form-towards-a-service.mld} | 10 +- ...all-sessions-for-one-user-or-all-tabs.mld} | 6 +- ...e-browser-window-has-the-focus-or-not.mld} | 6 +- .../how-to-make-hello-world-in-ocsigen.mld | 49 + .../how-to-make-hello-world-in-ocsigen.wiki | 56 - ...n.wiki => how-to-make-page-a-skeleton.mld} | 28 +- .../manual/how-to-make-responsive-css.mld} | 8 +- ...-the-server-and-insert-it-in-the-page.mld} | 18 +- ...vice-that-decides-itself-what-to-send.mld} | 8 +- ....wiki => how-to-register-session-data.mld} | 44 +- ...r-without-stopping-the-client-process.mld} | 12 +- .../manual/how-to-send-file-download.mld} | 4 +- ...pload.wiki => how-to-send-file-upload.mld} | 12 +- ...-or-other-attributes-to-html-elements.mld} | 48 +- ...w-to-stop-default-behaviour-of-events.mld} | 12 +- ...et-parameters-or-parameters-in-the-url.mld | 88 ++ ...t-parameters-or-parameters-in-the-url.wiki | 88 -- ...e.wiki => how-to-write-a-json-service.mld} | 16 +- ...rite-forms.wiki => how-to-write-forms.mld} | 38 +- .../how-to-write-titles-and-paragraphs.mld | 34 + .../how-to-write-titles-and-paragraphs.wiki | 34 - tutos/8.0/manual/{html.wiki => html.mld} | 106 +- .../{interaction.wiki => interaction.mld} | 671 ++++++------ tutos/8.0/manual/intro.mld | 139 +++ tutos/8.0/manual/intro.wiki | 157 --- tutos/8.0/manual/{lwt.wiki => lwt.mld} | 124 +-- .../8.0/manual/{macaque.wiki => macaque.mld} | 78 +- tutos/8.0/manual/{misc.wiki => misc.mld} | 141 +-- .../mobile.wiki => 8.0/manual/mobile.mld} | 32 +- tutos/8.0/manual/{music.wiki => music.mld} | 20 +- .../{ocsipersist.wiki => ocsipersist.mld} | 24 +- .../manual/{pictures.wiki => pictures.mld} | 53 +- ...diaplayer.wiki => reactivemediaplayer.mld} | 163 +-- tutos/8.0/manual/{rest.wiki => rest.mld} | 180 ++-- tutos/8.0/manual/start.mld | 111 ++ tutos/8.0/manual/start.wiki | 109 -- .../manual/{tutoreact.wiki => tutoreact.mld} | 522 ++++----- .../{tutowidgets.wiki => tutowidgets.mld} | 212 ++-- .../{application.wiki => application.mld} | 886 ++++++++-------- .../{basics-server.wiki => basics-server.mld} | 592 ++++++----- tutos/dev/manual/{basics.wiki => basics.mld} | 988 ++++++++++-------- .../{custom-conf.wiki => custom-conf.mld} | 26 +- .../{hash-password.wiki => hash-password.mld} | 12 +- ...te-a-cryptographically-safe-identifier.mld | 3 + ...e-a-cryptographically-safe-identifier.wiki | 3 - .../how-does-a-page-s-source-code-look.mld | 81 ++ .../how-does-a-page-s-source-code-look.wiki | 81 -- tutos/dev/manual/how-to-add-a-div.mld | 25 + tutos/dev/manual/how-to-add-a-div.wiki | 25 - tutos/dev/manual/how-to-add-a-favicon.mld | 16 + tutos/dev/manual/how-to-add-a-favicon.wiki | 16 - .../manual/how-to-add-a-javascript-script.mld | 30 + .../how-to-add-a-javascript-script.wiki | 30 - tutos/dev/manual/how-to-add-a-list.mld | 70 ++ tutos/dev/manual/how-to-add-a-list.wiki | 70 -- ...to-add-a-select-or-other-form-element.mld} | 26 +- tutos/dev/manual/how-to-add-an-image.mld | 46 + tutos/dev/manual/how-to-add-an-image.wiki | 46 - .../dev/manual/how-to-add-css-stylesheet.mld | 45 + .../dev/manual/how-to-add-css-stylesheet.wiki | 45 - ...o-attach-ocaml-values-to-dom-elements.mld} | 12 +- ...s-to-the-html-nodes-sent-to-the-client.mld | 3 + ...-to-the-html-nodes-sent-to-the-client.wiki | 3 - tutos/dev/manual/how-to-build-js-object.mld | 13 + tutos/dev/manual/how-to-build-js-object.wiki | 13 - ...server-side-function-from-client-side.mld} | 28 +- ...to-call-an-ocaml-function-from-js-code.mld | 3 + ...o-call-an-ocaml-function-from-js-code.wiki | 3 - ...ki => how-to-compile-my-ocsigen-pages.mld} | 32 +- ...onfigure-and-launch-the-ocsigen-server.mld | 23 + ...nfigure-and-launch-the-ocsigen-server.wiki | 23 - ...ding-on-data-entered-on-previous-ones.mld} | 6 +- ...a-current-page-without-knowing-its-url.mld | 11 + ...-current-page-without-knowing-its-url.wiki | 11 - ...> how-to-detect-channel-disconnection.mld} | 24 +- ...-side-state-for-the-process-is-closed.mld} | 6 +- ...iki => how-to-do-links-to-other-pages.mld} | 6 +- ...ow-to-implement-a-notification-system.mld} | 63 +- ...belonging-to-a-form-towards-a-service.mld} | 10 +- ...all-sessions-for-one-user-or-all-tabs.mld} | 6 +- ...e-browser-window-has-the-focus-or-not.mld} | 6 +- .../how-to-make-hello-world-in-ocsigen.mld | 49 + .../how-to-make-hello-world-in-ocsigen.wiki | 56 - ...n.wiki => how-to-make-page-a-skeleton.mld} | 28 +- .../manual/how-to-make-responsive-css.mld} | 8 +- ...-the-server-and-insert-it-in-the-page.mld} | 18 +- ...vice-that-decides-itself-what-to-send.mld} | 8 +- ....wiki => how-to-register-session-data.mld} | 44 +- ...r-without-stopping-the-client-process.mld} | 12 +- .../manual/how-to-send-file-download.mld} | 4 +- ...pload.wiki => how-to-send-file-upload.mld} | 12 +- ...-or-other-attributes-to-html-elements.mld} | 48 +- ...w-to-stop-default-behaviour-of-events.mld} | 12 +- ...et-parameters-or-parameters-in-the-url.mld | 88 ++ ...t-parameters-or-parameters-in-the-url.wiki | 88 -- ...e.wiki => how-to-write-a-json-service.mld} | 16 +- ...rite-forms.wiki => how-to-write-forms.mld} | 38 +- .../how-to-write-titles-and-paragraphs.mld | 34 + .../how-to-write-titles-and-paragraphs.wiki | 34 - tutos/dev/manual/{html.wiki => html.mld} | 106 +- .../{interaction.wiki => interaction.mld} | 671 ++++++------ tutos/dev/manual/intro.mld | 139 +++ tutos/dev/manual/intro.wiki | 157 --- tutos/dev/manual/{lwt.wiki => lwt.mld} | 124 +-- .../dev/manual/{macaque.wiki => macaque.mld} | 78 +- tutos/dev/manual/migration.mld | 138 +++ tutos/dev/manual/migration.wiki | 134 --- tutos/dev/manual/{misc.wiki => misc.mld} | 141 +-- .../mobile.wiki => dev/manual/mobile.mld} | 32 +- tutos/dev/manual/{music.wiki => music.mld} | 20 +- .../{ocsipersist.wiki => ocsipersist.mld} | 24 +- .../manual/{pictures.wiki => pictures.mld} | 53 +- ...diaplayer.wiki => reactivemediaplayer.mld} | 163 +-- tutos/dev/manual/{rest.wiki => rest.mld} | 180 ++-- tutos/dev/manual/start.mld | 111 ++ tutos/dev/manual/start.wiki | 109 -- .../manual/{tutoreact.wiki => tutoreact.mld} | 522 ++++----- .../{tutowidgets.wiki => tutowidgets.mld} | 212 ++-- 158 files changed, 7272 insertions(+), 6812 deletions(-) rename tutos/8.0/manual/{application.wiki => application.mld} (51%) rename tutos/8.0/manual/{basics-server.wiki => basics-server.mld} (52%) rename tutos/8.0/manual/{basics.wiki => basics.mld} (52%) rename tutos/8.0/manual/{custom-conf.wiki => custom-conf.mld} (86%) rename tutos/8.0/manual/{hash-password.wiki => hash-password.mld} (73%) create mode 100644 tutos/8.0/manual/how-do-i-create-a-cryptographically-safe-identifier.mld delete mode 100644 tutos/8.0/manual/how-do-i-create-a-cryptographically-safe-identifier.wiki create mode 100644 tutos/8.0/manual/how-does-a-page-s-source-code-look.mld delete mode 100644 tutos/8.0/manual/how-does-a-page-s-source-code-look.wiki create mode 100644 tutos/8.0/manual/how-to-add-a-div.mld delete mode 100644 tutos/8.0/manual/how-to-add-a-div.wiki create mode 100644 tutos/8.0/manual/how-to-add-a-favicon.mld delete mode 100644 tutos/8.0/manual/how-to-add-a-favicon.wiki create mode 100644 tutos/8.0/manual/how-to-add-a-javascript-script.mld delete mode 100644 tutos/8.0/manual/how-to-add-a-javascript-script.wiki create mode 100644 tutos/8.0/manual/how-to-add-a-list.mld delete mode 100644 tutos/8.0/manual/how-to-add-a-list.wiki rename tutos/8.0/manual/{how-to-add-a-select-or-other-form-element.wiki => how-to-add-a-select-or-other-form-element.mld} (61%) create mode 100644 tutos/8.0/manual/how-to-add-an-image.mld delete mode 100644 tutos/8.0/manual/how-to-add-an-image.wiki create mode 100644 tutos/8.0/manual/how-to-add-css-stylesheet.mld delete mode 100644 tutos/8.0/manual/how-to-add-css-stylesheet.wiki rename tutos/{dev/manual/how-to-attach-ocaml-values-to-dom-elements.wiki => 8.0/manual/how-to-attach-ocaml-values-to-dom-elements.mld} (52%) create mode 100644 tutos/8.0/manual/how-to-attach-ocaml-values-to-the-html-nodes-sent-to-the-client.mld delete mode 100644 tutos/8.0/manual/how-to-attach-ocaml-values-to-the-html-nodes-sent-to-the-client.wiki create mode 100644 tutos/8.0/manual/how-to-build-js-object.mld delete mode 100644 tutos/8.0/manual/how-to-build-js-object.wiki rename tutos/{dev/manual/how-to-call-a-server-side-function-from-client-side.wiki => 8.0/manual/how-to-call-a-server-side-function-from-client-side.mld} (52%) create mode 100644 tutos/8.0/manual/how-to-call-an-ocaml-function-from-js-code.mld delete mode 100644 tutos/8.0/manual/how-to-call-an-ocaml-function-from-js-code.wiki rename tutos/8.0/manual/{how-to-compile-my-ocsigen-pages.wiki => how-to-compile-my-ocsigen-pages.mld} (52%) create mode 100644 tutos/8.0/manual/how-to-configure-and-launch-the-ocsigen-server.mld delete mode 100644 tutos/8.0/manual/how-to-configure-and-launch-the-ocsigen-server.wiki rename tutos/8.0/manual/{how-to-create-form-wizard-sequence-of-pages-depending-on-data-entered-on-previous-ones.wiki => how-to-create-form-wizard-sequence-of-pages-depending-on-data-entered-on-previous-ones.mld} (96%) create mode 100644 tutos/8.0/manual/how-to-create-link-to-a-current-page-without-knowing-its-url.mld delete mode 100644 tutos/8.0/manual/how-to-create-link-to-a-current-page-without-knowing-its-url.wiki rename tutos/8.0/manual/{how-to-detect-channel-disconnection.wiki => how-to-detect-channel-disconnection.mld} (78%) rename tutos/8.0/manual/{how-to-detect-on-client-side-that-the-server-side-state-for-the-process-is-closed.wiki => how-to-detect-on-client-side-that-the-server-side-state-for-the-process-is-closed.mld} (59%) rename tutos/8.0/manual/{how-to-do-links-to-other-pages.wiki => how-to-do-links-to-other-pages.mld} (91%) rename tutos/8.0/manual/{how-to-implement-a-notification-system.wiki => how-to-implement-a-notification-system.mld} (61%) rename tutos/8.0/manual/{how-to-insert-raw-form-elements-not-belonging-to-a-form-towards-a-service.wiki => how-to-insert-raw-form-elements-not-belonging-to-a-form-towards-a-service.mld} (57%) rename tutos/8.0/manual/{how-to-iterate-on-all-sessions-for-one-user-or-all-tabs.wiki => how-to-iterate-on-all-sessions-for-one-user-or-all-tabs.mld} (87%) rename tutos/{dev/manual/how-to-know-whether-the-browser-window-has-the-focus-or-not.wiki => 8.0/manual/how-to-know-whether-the-browser-window-has-the-focus-or-not.mld} (77%) create mode 100644 tutos/8.0/manual/how-to-make-hello-world-in-ocsigen.mld delete mode 100644 tutos/8.0/manual/how-to-make-hello-world-in-ocsigen.wiki rename tutos/8.0/manual/{how-to-make-page-a-skeleton.wiki => how-to-make-page-a-skeleton.mld} (54%) rename tutos/{dev/manual/how-to-make-responsive-css.wiki => 8.0/manual/how-to-make-responsive-css.mld} (73%) rename tutos/8.0/manual/{how-to-make-the-client-side-program-get-an-html-element-from-the-server-and-insert-it-in-the-page.wiki => how-to-make-the-client-side-program-get-an-html-element-from-the-server-and-insert-it-in-the-page.mld} (64%) rename tutos/8.0/manual/{how-to-register-a-service-that-decides-itself-what-to-send.wiki => how-to-register-a-service-that-decides-itself-what-to-send.mld} (74%) rename tutos/8.0/manual/{how-to-register-session-data.wiki => how-to-register-session-data.mld} (61%) rename tutos/8.0/manual/{how-to-send-a-file-to-server-without-stopping-the-client-process.wiki => how-to-send-a-file-to-server-without-stopping-the-client-process.mld} (82%) rename tutos/{dev/manual/how-to-send-file-download.wiki => 8.0/manual/how-to-send-file-download.mld} (68%) rename tutos/8.0/manual/{how-to-send-file-upload.wiki => how-to-send-file-upload.mld} (91%) rename tutos/{dev/manual/how-to-set-and-id-classes-or-other-attributes-to-html-elements.wiki => 8.0/manual/how-to-set-and-id-classes-or-other-attributes-to-html-elements.mld} (57%) rename tutos/{dev/manual/how-to-stop-default-behaviour-of-events.wiki => 8.0/manual/how-to-stop-default-behaviour-of-events.mld} (61%) create mode 100644 tutos/8.0/manual/how-to-use-get-parameters-or-parameters-in-the-url.mld delete mode 100644 tutos/8.0/manual/how-to-use-get-parameters-or-parameters-in-the-url.wiki rename tutos/8.0/manual/{how-to-write-a-json-service.wiki => how-to-write-a-json-service.mld} (62%) rename tutos/8.0/manual/{how-to-write-forms.wiki => how-to-write-forms.mld} (72%) create mode 100644 tutos/8.0/manual/how-to-write-titles-and-paragraphs.mld delete mode 100644 tutos/8.0/manual/how-to-write-titles-and-paragraphs.wiki rename tutos/8.0/manual/{html.wiki => html.mld} (56%) rename tutos/8.0/manual/{interaction.wiki => interaction.mld} (68%) create mode 100644 tutos/8.0/manual/intro.mld delete mode 100644 tutos/8.0/manual/intro.wiki rename tutos/8.0/manual/{lwt.wiki => lwt.mld} (57%) rename tutos/8.0/manual/{macaque.wiki => macaque.mld} (69%) rename tutos/8.0/manual/{misc.wiki => misc.mld} (83%) rename tutos/{dev/manual/mobile.wiki => 8.0/manual/mobile.mld} (58%) rename tutos/8.0/manual/{music.wiki => music.mld} (69%) rename tutos/8.0/manual/{ocsipersist.wiki => ocsipersist.mld} (79%) rename tutos/8.0/manual/{pictures.wiki => pictures.mld} (84%) rename tutos/8.0/manual/{reactivemediaplayer.wiki => reactivemediaplayer.mld} (64%) rename tutos/8.0/manual/{rest.wiki => rest.mld} (76%) create mode 100644 tutos/8.0/manual/start.mld delete mode 100644 tutos/8.0/manual/start.wiki rename tutos/8.0/manual/{tutoreact.wiki => tutoreact.mld} (68%) rename tutos/8.0/manual/{tutowidgets.wiki => tutowidgets.mld} (69%) rename tutos/dev/manual/{application.wiki => application.mld} (51%) rename tutos/dev/manual/{basics-server.wiki => basics-server.mld} (52%) rename tutos/dev/manual/{basics.wiki => basics.mld} (52%) rename tutos/dev/manual/{custom-conf.wiki => custom-conf.mld} (86%) rename tutos/dev/manual/{hash-password.wiki => hash-password.mld} (73%) create mode 100644 tutos/dev/manual/how-do-i-create-a-cryptographically-safe-identifier.mld delete mode 100644 tutos/dev/manual/how-do-i-create-a-cryptographically-safe-identifier.wiki create mode 100644 tutos/dev/manual/how-does-a-page-s-source-code-look.mld delete mode 100644 tutos/dev/manual/how-does-a-page-s-source-code-look.wiki create mode 100644 tutos/dev/manual/how-to-add-a-div.mld delete mode 100644 tutos/dev/manual/how-to-add-a-div.wiki create mode 100644 tutos/dev/manual/how-to-add-a-favicon.mld delete mode 100644 tutos/dev/manual/how-to-add-a-favicon.wiki create mode 100644 tutos/dev/manual/how-to-add-a-javascript-script.mld delete mode 100644 tutos/dev/manual/how-to-add-a-javascript-script.wiki create mode 100644 tutos/dev/manual/how-to-add-a-list.mld delete mode 100644 tutos/dev/manual/how-to-add-a-list.wiki rename tutos/dev/manual/{how-to-add-a-select-or-other-form-element.wiki => how-to-add-a-select-or-other-form-element.mld} (61%) create mode 100644 tutos/dev/manual/how-to-add-an-image.mld delete mode 100644 tutos/dev/manual/how-to-add-an-image.wiki create mode 100644 tutos/dev/manual/how-to-add-css-stylesheet.mld delete mode 100644 tutos/dev/manual/how-to-add-css-stylesheet.wiki rename tutos/{8.0/manual/how-to-attach-ocaml-values-to-dom-elements.wiki => dev/manual/how-to-attach-ocaml-values-to-dom-elements.mld} (52%) create mode 100644 tutos/dev/manual/how-to-attach-ocaml-values-to-the-html-nodes-sent-to-the-client.mld delete mode 100644 tutos/dev/manual/how-to-attach-ocaml-values-to-the-html-nodes-sent-to-the-client.wiki create mode 100644 tutos/dev/manual/how-to-build-js-object.mld delete mode 100644 tutos/dev/manual/how-to-build-js-object.wiki rename tutos/{8.0/manual/how-to-call-a-server-side-function-from-client-side.wiki => dev/manual/how-to-call-a-server-side-function-from-client-side.mld} (52%) create mode 100644 tutos/dev/manual/how-to-call-an-ocaml-function-from-js-code.mld delete mode 100644 tutos/dev/manual/how-to-call-an-ocaml-function-from-js-code.wiki rename tutos/dev/manual/{how-to-compile-my-ocsigen-pages.wiki => how-to-compile-my-ocsigen-pages.mld} (50%) create mode 100644 tutos/dev/manual/how-to-configure-and-launch-the-ocsigen-server.mld delete mode 100644 tutos/dev/manual/how-to-configure-and-launch-the-ocsigen-server.wiki rename tutos/dev/manual/{how-to-create-form-wizard-sequence-of-pages-depending-on-data-entered-on-previous-ones.wiki => how-to-create-form-wizard-sequence-of-pages-depending-on-data-entered-on-previous-ones.mld} (96%) create mode 100644 tutos/dev/manual/how-to-create-link-to-a-current-page-without-knowing-its-url.mld delete mode 100644 tutos/dev/manual/how-to-create-link-to-a-current-page-without-knowing-its-url.wiki rename tutos/dev/manual/{how-to-detect-channel-disconnection.wiki => how-to-detect-channel-disconnection.mld} (80%) rename tutos/dev/manual/{how-to-detect-on-client-side-that-the-server-side-state-for-the-process-is-closed.wiki => how-to-detect-on-client-side-that-the-server-side-state-for-the-process-is-closed.mld} (67%) rename tutos/dev/manual/{how-to-do-links-to-other-pages.wiki => how-to-do-links-to-other-pages.mld} (91%) rename tutos/dev/manual/{how-to-implement-a-notification-system.wiki => how-to-implement-a-notification-system.mld} (61%) rename tutos/dev/manual/{how-to-insert-raw-form-elements-not-belonging-to-a-form-towards-a-service.wiki => how-to-insert-raw-form-elements-not-belonging-to-a-form-towards-a-service.mld} (57%) rename tutos/dev/manual/{how-to-iterate-on-all-sessions-for-one-user-or-all-tabs.wiki => how-to-iterate-on-all-sessions-for-one-user-or-all-tabs.mld} (87%) rename tutos/{8.0/manual/how-to-know-whether-the-browser-window-has-the-focus-or-not.wiki => dev/manual/how-to-know-whether-the-browser-window-has-the-focus-or-not.mld} (77%) create mode 100644 tutos/dev/manual/how-to-make-hello-world-in-ocsigen.mld delete mode 100644 tutos/dev/manual/how-to-make-hello-world-in-ocsigen.wiki rename tutos/dev/manual/{how-to-make-page-a-skeleton.wiki => how-to-make-page-a-skeleton.mld} (54%) rename tutos/{8.0/manual/how-to-make-responsive-css.wiki => dev/manual/how-to-make-responsive-css.mld} (73%) rename tutos/dev/manual/{how-to-make-the-client-side-program-get-an-html-element-from-the-server-and-insert-it-in-the-page.wiki => how-to-make-the-client-side-program-get-an-html-element-from-the-server-and-insert-it-in-the-page.mld} (64%) rename tutos/dev/manual/{how-to-register-a-service-that-decides-itself-what-to-send.wiki => how-to-register-a-service-that-decides-itself-what-to-send.mld} (74%) rename tutos/dev/manual/{how-to-register-session-data.wiki => how-to-register-session-data.mld} (61%) rename tutos/dev/manual/{how-to-send-a-file-to-server-without-stopping-the-client-process.wiki => how-to-send-a-file-to-server-without-stopping-the-client-process.mld} (82%) rename tutos/{8.0/manual/how-to-send-file-download.wiki => dev/manual/how-to-send-file-download.mld} (68%) rename tutos/dev/manual/{how-to-send-file-upload.wiki => how-to-send-file-upload.mld} (91%) rename tutos/{8.0/manual/how-to-set-and-id-classes-or-other-attributes-to-html-elements.wiki => dev/manual/how-to-set-and-id-classes-or-other-attributes-to-html-elements.mld} (57%) rename tutos/{8.0/manual/how-to-stop-default-behaviour-of-events.wiki => dev/manual/how-to-stop-default-behaviour-of-events.mld} (61%) create mode 100644 tutos/dev/manual/how-to-use-get-parameters-or-parameters-in-the-url.mld delete mode 100644 tutos/dev/manual/how-to-use-get-parameters-or-parameters-in-the-url.wiki rename tutos/dev/manual/{how-to-write-a-json-service.wiki => how-to-write-a-json-service.mld} (62%) rename tutos/dev/manual/{how-to-write-forms.wiki => how-to-write-forms.mld} (72%) create mode 100644 tutos/dev/manual/how-to-write-titles-and-paragraphs.mld delete mode 100644 tutos/dev/manual/how-to-write-titles-and-paragraphs.wiki rename tutos/dev/manual/{html.wiki => html.mld} (56%) rename tutos/dev/manual/{interaction.wiki => interaction.mld} (68%) create mode 100644 tutos/dev/manual/intro.mld delete mode 100644 tutos/dev/manual/intro.wiki rename tutos/dev/manual/{lwt.wiki => lwt.mld} (57%) rename tutos/dev/manual/{macaque.wiki => macaque.mld} (69%) create mode 100644 tutos/dev/manual/migration.mld delete mode 100644 tutos/dev/manual/migration.wiki rename tutos/dev/manual/{misc.wiki => misc.mld} (83%) rename tutos/{8.0/manual/mobile.wiki => dev/manual/mobile.mld} (58%) rename tutos/dev/manual/{music.wiki => music.mld} (69%) rename tutos/dev/manual/{ocsipersist.wiki => ocsipersist.mld} (79%) rename tutos/dev/manual/{pictures.wiki => pictures.mld} (84%) rename tutos/dev/manual/{reactivemediaplayer.wiki => reactivemediaplayer.mld} (64%) rename tutos/dev/manual/{rest.wiki => rest.mld} (76%) create mode 100644 tutos/dev/manual/start.mld delete mode 100644 tutos/dev/manual/start.wiki rename tutos/dev/manual/{tutoreact.wiki => tutoreact.mld} (68%) rename tutos/dev/manual/{tutowidgets.wiki => tutowidgets.mld} (69%) diff --git a/tutos/8.0/manual/application.wiki b/tutos/8.0/manual/application.mld similarity index 51% rename from tutos/8.0/manual/application.wiki rename to tutos/8.0/manual/application.mld index cc12891e..d2c83151 100644 --- a/tutos/8.0/manual/application.wiki +++ b/tutos/8.0/manual/application.mld @@ -1,45 +1,49 @@ -<> +{%wodoc:header%} +{0 Writing a client/server Eliom application} +{%wodoc:end%} -In this chapter, we will write a [[site:graffiti/|collaborative -drawing application]]. It is a client/server web application +In this chapter, we will write a {{:../graffiti/}collaborative +drawing application}. It is a client/server web application displaying an area where users can draw using the mouse, and see what other users are drawing at the same time and in real-time. This tutorial is a good starting point if you want a step-by-step introduction to Eliom programming. -<> + The final eliom code is available +{{:https://github.com/ocsigen/graffiti/tree/master/simple}for download}. -<<|outline target="documentation">> -==@@id="basics"@@ Basics== + + +{1:basics Basics} If not already done, install Eliom first: -{{{ +{v opam install ocsipersist-sqlite eliom ocsigen-ppx-rpc -}}} +v} -To get started, we recommend using <>, a program which +To get started, we recommend using {{:../eliom/workflow-distillery.html}Eliom distillery}, a program which creates scaffolds for Eliom projects. The following command creates a -very simple project called {{{graffiti}}} in the directory -{{{graffiti}}}: +very simple project called [graffiti] in the directory +[graffiti]: -<> +]} -===My first page=== +{2 My first page} -<> +{%wodoc:aside class="concepts"%}{b Concepts} + +Services{%html:
%}Configuration file{%html:
%}Static validation of HTML{%wodoc:end%} Our web application consists of a single page for now. Let's start by creating a very basic page. We define the service that will implement this page by the following declaration: -<> +]} -Annotations {{{%server}}} tells the compiler that the code is going to be executed +Annotations [%server] tells the compiler that the code is going to be executed on the server (see later). -Replace the content of file {{{graffiti.eliom}}} by the above lines and run: +Replace the content of file [graffiti.eliom] by the above lines and run: -<> +]} + +This will compile your application and run [ocsigenserver]. -This will compile your application and run {{{ocsigenserver}}}. +Your page is now available at URL {{:http://localhost:8080/graff}[http://localhost:8080/graff]}. -Your page is now available at URL [[http://localhost:8080/graff|{{{http://localhost:8080/graff}}}]]. + +{%wodoc:aside class="concept"%}{b Concept: Services} -<> allows to -create new entry points to your web site, called //services//. In +The module {!Eliom_service} allows to +create new entry points to your web site, called {e services}. In general, services are attached to a URL and generate a web page. Services are represented by OCaml values, through which you must register a function that will generate a page. -The {{{~path}}} parameter corresponds to the URL where you want to +The [~path] parameter corresponds to the URL where you want to attach your service. It is a list of strings. The value -<> corresponds to the URL -<>. <> corresponds to -the URL <> (that is: the default page of the -directory <>). +{[["foo"; "bar"]]} corresponds to the URL +{[foo/bar]}. {[["dir"; ""]]} corresponds to +the URL {[dir/]} (that is: the default page of the +directory {[dir]}). + +{%wodoc:end%} + +{%wodoc:aside class="concept"%}{b Concept: Configuration file} ->> -< -}}} +v} -{{{}}} asks the server to load Eliom module -{{{graffiti.cma}}}, containing the Eliom application, +[] asks the server to load Eliom module +[graffiti.cma], containing the Eliom application, at startup and attach it to this host (and site). -Extensions {{{}}} (staticmod) and {{{}}} +Extensions [] (staticmod) and [] are called successively: -* If they exist, files from the directory <> will be served, -* Otherwise, Server will try to generate pages with Eliom - ({{{}}}), -* Otherwise it will generate a 404 (Not found) error (default). +- If they exist, files from the directory {[ + /path_to/graffiti/static ]} will be served, +- Otherwise, Server will try to generate pages with Eliom + ([]), +- Otherwise it will generate a 404 (Not found) error (default). + +{%wodoc:end%} + +{%wodoc:aside class="concept"%}{b Concept: Static validation of HTML} ->> -<>, -which is implemented using the <> +module {!Eliom_content.Html.D}, +which is implemented using the {{:../tyxml/.html}TyXML} library. The module defines a construction function for each HTML tag. -//Note that it is also possible to use the usual HTML syntax directly - in OCaml, cf. <>.// +{e Note that it is also possible to use the usual HTML syntax directly + in OCaml, cf. {!Pa_tyxml}.} -The TyXML library (and thus <>) is very strict and compels you to respect +The TyXML library (and thus {!module +Eliom_content.Html.D}) is very strict and compels you to respect HTML standard (with some limitations). For example if you write: -<> +]} You will get an error message similar to the following, referring to the end of line 2: -{{{ +{v Error: This expression has type ([> `TXT ] as 'a) Html.elt but an expression was expected of type Html_types.head_content_fun Html.elt @@ -169,89 +179,72 @@ Error: This expression has type ([> `TXT ] as 'a) Html.elt | `Script | `Style ] The second variant type does not allow tag(s) `TXT -}}} +v} -where <> -is the type of content allowed inside {{{}}} ({{{}}}, -{{{}}}, {{{}}}, {{{}}}, etc.). Notice that -{{{`TXT}}} (i.e. raw text) is not included in this polymorphic -variant type, which means that {{{}}} cannot contain raw text. +where {!Html_types.head_content_fun} +is the type of content allowed inside [] ([], +[], [], [], etc.). Notice that +[`TXT] (i.e. raw text) is not included in this polymorphic +variant type, which means that [] cannot contain raw text. Most functions take as parameter the list representing its contents. -See other examples below. Each of them take an optional {{{?a}}} +See other examples below. Each of them take an optional [?a] parameter for optional HTML attributes. Mandatory HTML attributes correspond to mandatory OCaml parameters. See below for examples. -<<| -**Another example:** In HTML, some tags cannot be empty. For example -{{{}}}must contain at least one row. To enforce this, function -<> -takes two parameters: the first one is the first row, while -the second one is a list containing all the other rows (same thing for -{{{}}}, {{{}}}, {{{
}}}must contain at least one row. To enforce this, function -<> -takes two parameters: the first one is the first row, while -the second one is a list containing all the other rows (same thing for -{{{}}}, {{{}}}, {{{