Skip to content

Commit

Permalink
Merge pull request #39 from ocsigen/fix-tuto-a_api
Browse files Browse the repository at this point in the history
Partial fix for documentation errors
  • Loading branch information
balat authored Sep 3, 2024
2 parents d2e94ee + 6140dad commit 9b1d828
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tutos/dev/manual/how-to-add-a-javascript-script.wiki
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ If you have client-side programs on your website, you can use Eliom's client-ser

=== Include the script on the html header

Javascript scripts are included in the header using the **js_script** function (defined in <<a_api project="eliom" subproject="server"|val Eliom_content.Html.D>>).
Javascript scripts are included in the header using the **js_script** function (defined in <<a_api project="eliom" subproject="server"| module Eliom_content.Html.D>>).

<<code language="ocaml"|
open Eliom_content.Html.D (* for make_uri an js_script *)
Expand All @@ -16,7 +16,7 @@ js_script
>>
This function has 2 parameters: the file path and unit.

The file path is generated using the **make_uri** function (from <<a_api project="eliom" subproject="server"|val Eliom_content.Html.D>> module). This function creates the relative URL string using the static directory (which is a service) configured in the configuration file and the given list.
The file path is generated using the **make_uri** function (from <<a_api project="eliom" subproject="server"| module Eliom_content.Html.D>> module). This function creates the relative URL string using the static directory (which is a service) configured in the configuration file and the given list.

Insert this piece of code on the list given in parameter to the **head** function.

Expand Down

0 comments on commit 9b1d828

Please sign in to comment.