Skip to content

Commit

Permalink
Fix documentation links
Browse files Browse the repository at this point in the history
  • Loading branch information
AltGr committed May 10, 2018
1 parent 185a056 commit 6b17ecf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions jbuild-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
www
www0
4 changes: 2 additions & 2 deletions src/o2wDocumentation.ml
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ let to_menu ~content_dir =
menu_20 @
[{
menu_source = "1.1";
menu_link = Uri.make ~path:(content_dir ^ "/doc/1.1/") ();
menu_link = Uri.make ~path:("doc/1.1/") ();
menu_link_text = "Archives (OPAM 1.1)";
menu_link_html = Html.string "Archives (OPAM 1.1)";
menu_item = External;
Expand All @@ -292,7 +292,7 @@ let to_menu ~content_dir =
};
{
menu_source = "1.2";
menu_link = Uri.make ~path:(content_dir ^ "/doc/1.2/") ();
menu_link = Uri.make ~path:("doc/1.2/") ();
menu_link_text = "Archives (OPAM 1.2)";
menu_link_html = Html.string "Archives (OPAM 1.2)";
menu_item = External;
Expand Down
9 changes: 7 additions & 2 deletions src/o2wTemplate.ml
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,13 @@ let make_nav (active, depth) pages =
in
match m.menu_item with
| External ->
Html.li ~cls:class_attr
(Html.a ~href:m.menu_link m.menu_link_html)
let lnk =
if Uri.host m.menu_link = None then
prepend_root depth m.menu_link
else m.menu_link
in
Html.li ~cls:class_attr
(Html.a ~href:lnk m.menu_link_html)
| Internal _ ->
let lnk = prepend_root depth m.menu_link in
Html.li ~cls:class_attr
Expand Down

0 comments on commit 6b17ecf

Please sign in to comment.