Expose API documentation on github pages.

Also, unbreak documentation builds with style.css,
and use @dbuenzli's style, which is quite nicer than
the existing one.
This commit is contained in:
Peter Zotov 2014-10-28 03:40:23 +03:00
parent caf6ac1031
commit 35419a3284
4 changed files with 114 additions and 158 deletions

View File

@ -28,6 +28,7 @@ build: $(SETUP) setup.data
doc: $(SETUP) setup.data build doc: $(SETUP) setup.data build
./$(SETUP) -doc $(DOCFLAGS) ./$(SETUP) -doc $(DOCFLAGS)
cp style.css _build/utop-api.docdir/
test: $(SETUP) setup.data build test: $(SETUP) setup.data build
./$(SETUP) -test $(TESTFLAGS) ./$(SETUP) -test $(TESTFLAGS)
@ -56,4 +57,15 @@ configure: $(SETUP)
setup.data: $(SETUP) setup.data: $(SETUP)
./$(SETUP) -configure $(CONFIGUREFLAGS) ./$(SETUP) -configure $(CONFIGUREFLAGS)
.PHONY: default build doc test all install uninstall reinstall clean distclean configure gh-pages: doc
git clone `git config --get remote.origin.url` .gh-pages --reference .
git -C .gh-pages checkout --orphan gh-pages
git -C .gh-pages reset
git -C .gh-pages clean -dxf
cp -t .gh-pages/ _build/utop-api.docdir/*
git -C .gh-pages add .
git -C .gh-pages commit -m "Update Pages"
git -C .gh-pages push origin gh-pages -f
rm -rf .gh-pages
.PHONY: default build doc test all install uninstall reinstall clean distclean configure gh-pages

View File

@ -104,6 +104,11 @@ this file by executing:
$ man 5 lambda-term-inputrc $ man 5 lambda-term-inputrc
### UTop API
UTop exposes several more settings through its API; see
[documentation](http://diml.github.io/utop).
Integration with emacs Integration with emacs
---------------------- ----------------------

1
_oasis
View File

@ -89,6 +89,7 @@ Document "utop-api"
BuildTools: ocamldoc BuildTools: ocamldoc
XOCamlbuildPath: ./ XOCamlbuildPath: ./
XOCamlbuildLibraries: utop XOCamlbuildLibraries: utop
XOCamlbuildExtraArgs: "-docflag -t -docflag 'API reference for utop' -docflags '-colorize-code -short-functors -charset utf-8 -css-style style.css'"
# +-------------------------------------------------------------------+ # +-------------------------------------------------------------------+
# | Manual pages | # | Manual pages |

252
style.css
View File

@ -1,171 +1,109 @@
/* A style for ocamldoc. Daniel C. Buenzli, Jérémie Dimino */ /* A style for ocamldoc. Daniel C. Buenzli */
body { /* Reset a few things. */
padding: 0em; html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,
border: 0em; a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,
margin: 2em 10% 2em 10%; small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,
font-weight: normal; form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td
line-height: 130%; { margin: 0; padding: 0; border: 0 none; outline: 0; font-size: 100%;
text-align: justify; font-weight: inherit; font-style:inherit; font-family:inherit;
background: white; line-height: inherit; vertical-align: baseline; text-align:inherit;
color : black; color:inherit; background: transparent; }
min-width: 40ex;
}
pre, p, div, span, img, table, td, ol, ul, li { table { border-collapse: collapse; border-spacing: 0; }
padding: 0em;
border: 0em; /* Basic page layout */
margin: 0em
} body { font: normal 10pt/1.375em helvetica, arial, sans-serif; text-align:left;
margin: 1.375em 10%; min-width: 40ex; max-width: 72ex;
color: black; background: transparent /* url(line-height-22.gif) */; }
b { font-weight: bold }
em { font-style: italic }
tt, code, pre { font-family: WorkAroundWebKitAndMozilla, monospace;
font-size: 1em; }
pre code { font-size : inherit; }
.codepre { margin-bottom:1.375em /* after code example we introduce space. */ }
.superscript,.subscript
{ font-size : 0.813em; line-height:0; margin-left:0.4ex;}
.superscript { vertical-align: super; }
.subscript { vertical-align: sub; }
/* ocamldoc markup workaround hacks */
hr, hr + br, div + br, center + br, span + br, ul + br, ol + br, pre + br
{ display: none } /* annoying */
div.info + br { display:block}
.codepre br + br { display: none }
h1 + pre { margin-bottom:1.375em} /* Toplevel module description */
/* Sections and document divisions */
/* .navbar { margin-bottom: -1.375em } */
h1 { font-weight: bold; font-size: 1.5em; /* margin-top:1.833em; */
margin-top:0.917em; padding-top:0.875em;
border-top-style:solid; border-width:1px; border-color:#AAA; }
h2 { font-weight: bold; font-size: 1.313em; margin-top: 1.048em }
h3 { font-weight: bold; font-size: 1.125em; margin-top: 1.222em }
h3 { font-weight: bold; font-size: 1em; margin-top: 1.375em}
h4 { font-style: italic; }
/* Used by OCaml's own library documentation. */
h6 { font-weight: bold; font-size: 1.125em; margin-top: 1.222em }
.h7 { font-weight: bold; font-size: 1em; margin-top: 1.375em }
p { margin-top: 1.375em }
pre { margin-top: 1.375em }
.info { margin: 0.458em 0em -0.458em 2em;}/* Description of types values etc. */
td .info { margin:0; padding:0; margin-left: 2em;} /* Description in indexes */
ul, ol { margin-top:0.688em; padding-bottom:0.687em;
list-style-position:outside}
ul + p, ol + p { margin-top: 0em }
ul { list-style-type: square }
/* h2 + ul, h3 + ul, p + ul { } */
ul > li { margin-left: 1.375em; }
ol > li { margin-left: 1.7em; }
/* Links */
a, a:link, a:visited, a:active, a:hover { color : #00B; text-decoration: none }
a:hover { text-decoration : underline }
*:target {background-color: #FFFF99;} /* anchor highlight */
/* Code */
.keyword { font-weight: bold; }
.comment { color : red }
.constructor { color : green }
.string { color : brown }
.warning { color : red ; font-weight : bold }
/* Functors */
.paramstable { border-style : hidden ; padding-bottom:1.375em}
.paramstable code { margin-left: 1ex; margin-right: 1ex }
.sig_block {margin-left: 1em}
/* Images */
img { margin-top: 1.375em }
h1, h2, h3, h4, h5, h6, div.h7, div.h8, div.h9 {
fontsize: 100%;
margin-bottom: 1em
padding: 1ex 0em 0em 0em;
border: 0em;
margin: 1em 0em 0em 0em;
font-weight : bold;
text-align: center;
}
h1 {
font-size : 140%
}
h2, h3, h4, h5, h6, div.h7, div.h8, div.h9 {
font-size : 100%;
border-top-style : none;
margin: 1ex 0em 0em 0em;
border: 1px solid #000000;
margin-top: 5px;
margin-bottom: 2px;
text-align: center;
padding: 2px;
}
h2 {
font-size : 120%;
background-color: #90BDFF ;
}
h3 {
background-color: #90DDFF;
}
h4 {
background-color: #90EDFF;
}
h5 {
background-color: #90FDFF;
}
h6 {
background-color: #C0FFFF;
}
div.h7 {
background-color: #E0FFFF;
}
div.h8 {
background-color: #F0FFFF;
}
div.h9 {
background-color: #FFFFFF;
}
.navbar {
padding-bottom : 1em;
margin-bottom: 1em;
border-bottom: 1px solid #000000;
border-bottom-style: dotted;
}
p {
padding: 1em 0ex 0em 0em
}
a, a:link, a:visited, a:active, a:hover {
color : #009;
text-decoration: none
}
a:hover {
color : #009;
text-decoration : none;
background-color: #5FFF88
}
hr {
border-style: none;
}
table {
font-size : 100% /* Why ? */
}
ul li {
padding: 1em 0em 0em 0em;
margin:0em 0em 0em 2.5ex
}
ol li {
padding: 1em 0em 0em 0em;
margin:0em 0em 0em 2em
}
pre {
margin: 3ex 0em 1ex 0em;
background-color: #edf0f9;
}
.keyword {
font-weight: bold;
color: #a020f0;
}
.keywordsign {
font-weight: bold;
color: #a020f0;
}
.typefieldcomment {
color : #b22222;
}
.keywordsign {
color: #a020f0;
}
.code {
font-size: 100%;
color: #5f5f5f;
}
.info {
margin: 0em 0em 0em 2em
}
.comment {
color : #b22222;
}
.constructor {
color : #072
}
.type {
color : #228b22;
}
.string {
color : #bc8f8f;
}
.warning {
color : Red;
font-weight : bold
}
div.sig_block {
margin-left: 2em
}
.typetable {
color : #b8860b;
border-style : hidden
}
.indextable {
border-style : hidden
}
.paramstable {
border-style : hidden;
padding: 5pt 5pt
}
.superscript {
font-size : 80%
}
.subscript {
font-size : 80%
}