Skip to content

Commit 07d43ad

Browse files
committed
odoc: put odoc support files in .odoc_support
Fixes #7364 If the directory is named `_odoc_support` with a leading underscore, it is omitted when deploying to github pages. This is because this system also support the jekyll site generator, which uses this convention for data files. We can not use any directory name here since we want to avoid conflicts with OCaml identifiers and names of `*.mld` files. Starting with a dot seems to fit the requirements. Signed-off-by: Etienne Millon <me@emillon.org>
1 parent a04e838 commit 07d43ad

File tree

5 files changed

+5
-5
lines changed
  • src/dune_rules
  • test/blackbox-tests/test-cases/odoc

5 files changed

+5
-5
lines changed

src/dune_rules/odoc.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ let add_rule sctx =
8585
Super_context.add_rule sctx ~dir
8686

8787
module Paths = struct
88-
let odoc_support_dirname = "_odoc_support"
88+
let odoc_support_dirname = ".odoc_support"
8989

9090
let root (context : Context.t) =
9191
Path.Build.relative context.Context.build_dir "_doc"

test/blackbox-tests/test-cases/odoc/multiple-private-libs.t/run.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
This test checks that there is no clash when two private libraries have the same name
22

33
$ dune build --display short @doc-private
4-
odoc _doc/_html/_odoc_support
4+
odoc _doc/_html/.odoc_support
55
ocamlc a/.test.objs/byte/test.{cmi,cmo,cmt}
66
ocamlc b/.test.objs/byte/test.{cmi,cmo,cmt}
77
odoc a/.test.objs/byte/test.odoc

test/blackbox-tests/test-cases/odoc/odoc-simple.t/run.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This test if `.odocl` files are generated
1616
<html xmlns="http://www.w3.org/1999/xhtml">
1717
<head>
1818
<title>index</title>
19-
<link rel="stylesheet" href="./_odoc_support/odoc.css"/>
19+
<link rel="stylesheet" href="./.odoc_support/odoc.css"/>
2020
<meta charset="utf-8"/>
2121
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
2222
</head>

test/blackbox-tests/test-cases/odoc/odoc-unique-mlds/diff-scope.t/run.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Duplicate mld's in different scope
22
$ dune build @doc --display short
3-
odoc _doc/_html/_odoc_support
3+
odoc _doc/_html/.odoc_support
44
odoc _doc/_odoc/pkg/scope1/page-index.odoc
55
ocamlc scope1/.scope1.objs/byte/scope1.{cmi,cmo,cmt}
66
odoc _doc/_odoc/pkg/scope2/page-index.odoc

test/blackbox-tests/test-cases/odoc/odoc-unique-mlds/same-scope.t/run.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Duplicate mld's in the same scope
22
$ dune build @doc --display short
3-
odoc _doc/_html/_odoc_support
3+
odoc _doc/_html/.odoc_support
44
odoc _doc/_odoc/pkg/root/page-index.odoc
55
ocamlc lib1/.root_lib1.objs/byte/root_lib1.{cmi,cmo,cmt}
66
ocamlc lib2/.root_lib2.objs/byte/root_lib2.{cmi,cmo,cmt}

0 commit comments

Comments
 (0)