Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove confusing navigation bar from stdlib documentation #10139

Merged
merged 8 commits into from
Jan 22, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions api_docgen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ html/libref/Stdlib.html: $(ALL_LIBREF:%=build/%.odoc)
$(MKDIR) -p html/libref
$(OCAMLDOC_RUN) -html -d html/libref \
-charset="utf8" \
-nostdlib -hide Stdlib -lib Stdlib -t "OCaml library" \
-nonavbar -nostdlib -hide Stdlib -lib Stdlib -t "OCaml library" \
$(addprefix -load , $(ALL_LIBREF:%=build/%.odoc))

html/compilerlibref/Compiler_libs.html: $(ALL_COMPILERLIBREF:%=build/%.odoc)
$(MKDIR) -p html/compilerlibref
$(OCAMLDOC_RUN) -html -d html/compilerlibref \
-nostdlib -hide Stdlib -t "OCaml compiler library" \
-nonavbar -nostdlib -hide Stdlib -t "OCaml compiler library" \
-charset="utf8" \
-intro Compiler_libs.mld \
$(addprefix -load , $(ALL_COMPILERLIBREF:%=build/%.odoc))
Expand Down
8 changes: 0 additions & 8 deletions manual/manual/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,8 @@ export LD_LIBRARY_PATH ?= "$(SRC)/otherlibs/unix/:$(SRC)/otherlibs/str/"
export DYLD_LIBRARY_PATH ?= "$(SRC)/otherlibs/unix/:$(SRC)/otherlibs/str/"
SET_LD_PATH = CAML_LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)

OCAMLDOC = $(if $(wildcard $(SRC)/ocamldoc/ocamldoc.opt),\
$(SRC)/ocamldoc/ocamldoc.opt,\
$(SET_LD_PATH) $(SRC)/runtime/ocamlrun $(SRC)/ocamldoc/ocamldoc)\
-hide Stdlib -lib Stdlib -nostdlib \
-pp "$(AWK) -v ocamldoc=true -f $(SRC)/stdlib/expand_module_aliases.awk"
Comment on lines -7 to -11
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a clean-up following #9996



TEXQUOTE = $(SRC)/runtime/ocamlrun ../tools/texquote2


FILES = allfiles.tex biblio.tex foreword.tex version.tex warnings-help.etex

TEXINPUTS = ".:..:../refman:../library:../cmds:../tutorials:../../styles:"
Expand Down
3 changes: 2 additions & 1 deletion ocamldoc/odoc_args.ml
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ let default_options = Options.list @
"-index-only", Arg.Set Odoc_html.index_only, M.index_only ;
"-colorize-code", Arg.Set Odoc_html.colorize_code, M.colorize_code ;
"-short-functors", Arg.Set Odoc_html.html_short_functors, M.html_short_functors ;
"-charset", Arg.Set_string Odoc_html.charset, (M.charset !Odoc_html.charset)^
"-charset", Arg.Set_string Odoc_html.charset, (M.charset !Odoc_html.charset) ;
"-nonavbar", Arg.Clear Odoc_html.show_navbar, M.no_navbar ^
"\n\n *** LaTeX options ***\n";

(* latex only options *)
Expand Down
11 changes: 6 additions & 5 deletions ocamldoc/odoc_html.ml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ let index_only = ref false
let colorize_code = ref false
let html_short_functors = ref false
let charset = ref "iso-8859-1"
let show_navbar = ref true


(** The functions used for naming files and html marks.*)
Expand Down Expand Up @@ -2396,7 +2397,7 @@ class html =
bs b "<html>\n";
self#print_header b (self#inner_title title);
bs b "<body>\n";
self#print_navbar b None None "";
if !show_navbar then self#print_navbar b None None "";
johnwhitington marked this conversation as resolved.
Show resolved Hide resolved
bs b "<h1>";
bs b title;
bs b "</h1>\n" ;
Expand Down Expand Up @@ -2478,7 +2479,7 @@ class html =
~comments: (Class.class_comments cl)
(self#inner_title cl.cl_name);
bs b "<body>\n";
self#print_navbar b pre_name post_name cl.cl_name;
if !show_navbar then self#print_navbar b pre_name post_name cl.cl_name;
bs b "<h1>";
bs b (Odoc_messages.clas^" ");
if cl.cl_virtual then bs b "virtual " ;
Expand Down Expand Up @@ -2526,7 +2527,7 @@ class html =
(self#inner_title clt.clt_name);

bs b "<body>\n";
self#print_navbar b pre_name post_name clt.clt_name;
if !show_navbar then self#print_navbar b pre_name post_name clt.clt_name;
bs b "<h1>";
bs b (Odoc_messages.class_type^" ");
if clt.clt_virtual then bs b "virtual ";
Expand Down Expand Up @@ -2571,7 +2572,7 @@ class html =
~comments: (Module.module_type_comments mt)
(self#inner_title mt.mt_name);
bs b "<body>\n";
self#print_navbar b pre_name post_name mt.mt_name;
if !show_navbar then self#print_navbar b pre_name post_name mt.mt_name;
bp b "<h1>";
bs b (Odoc_messages.module_type^" ");
(
Expand Down Expand Up @@ -2639,7 +2640,7 @@ class html =
~comments: (Module.module_comments modu)
(self#inner_title modu.m_name);
bs b "<body>\n" ;
self#print_navbar b pre_name post_name modu.m_name ;
if !show_navbar then self#print_navbar b pre_name post_name modu.m_name ;
bs b "<h1>";
if modu.m_text_only then
bs b modu.m_name
Expand Down
1 change: 1 addition & 0 deletions ocamldoc/odoc_messages.ml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ let html_short_functors = " Use short form to display functor types "^html_only
let charset c = Printf.sprintf
"<s> Add information about character encoding being s\n\t\t(default is %s)"
c
let no_navbar = " Do not include the navigation bar "^html_only
let generate_html = " Generate HTML documentation"
let generate_latex = " Generate LaTeX documentation"
let generate_texinfo = " Generate TeXinfo documentation"
Expand Down