Using haxedoc

First generate an XML using

haxe -xml output.xml build.hxml

Then use this XML from haxedoc :
haxedoc output.xml

To get documation for only a few classes / packages use a filter or combine multiple filters:
haxedoc output.xml -f package_or_class

Theming your haxedoc output


haxedoc is capable of generating files inside a basic html template. In the same folder as your output.xml file, you need to place a file called "template.xml".

When haxedoc runs, all files will use this template. The template can include any javascript or css to help you style the page. Your template must contain an empty element called "<data />", which will house all of the documentation content.

Below is an example template.xml:

<html>

<head>
<title>API Documentation</title>

<script type="text/javascript">
<!--
    function toggle(id) {
        var e = document.getElementById(id);
        e.isopen = !e.isopen;
        e.style.display = e.isopen?"block":"none";
        return false;
    }
-->
</script>

<style type="text/css">
body {
    text-align: center;
    font-family: Trebuchet MS, sans-serif;
    background-color : #7D7E86;
}

.document {
    width : 800px;
    position : relative;
    margin : 10px auto 5px auto;
    border : solid 2px #CFD0D4;
    text-align : justify;
    background-color: #F6FAFD;
}

.title {
    font-size: 35;
    font-weight: bold;
    text-align: center;
    background-color : #FFD473;
    color : white;
}

ul.entry {
    list-style-type: circle;
    font-weight : bold;
    margin-left : 30px;
}

.package_content {
    display : none;
}

a {
    color : #FFBB00;
    font-weight : bold;
    text-decoration : none;
}

a:hover {
    color : #FFAE00;
    text-decoration : underline;
}

a.package {
    color : black;
}

.index {
    margin-left : 10px;
}

.kwd {
    color : #00A;
}

.classname {
    font-size : 30;
    font-weight : bold;
    margin-left : 10px;
    margin-bottom : 20px;
}

.classdoc {
    border : 1px dashed #666;
    margin-left : 20px;
    margin-right : 20px;
    padding : 5 5 5 5;
}

.importmod, .extends, .implements, .typedef, .platforms {
    margin-left: 20px;
    color : #777;
}

dd {
    margin : 0 20 20 40;
    font-size : 12pt;
    color : #444;
}

dt {
    margin-left : 20px;
    margin-bottom : 5px;
    text-align : left;
    font-size : 10pt;
    font-family: Courier New, monospace;
}

</style>

</head>

<body>

<div class="document">

<div class="title">API Documentation</div>

<data />

</div>

</body>
</html>

Once this file is included in the same directory as your "output.xml", your haxedoc generated documentation should all be themed accordingly.

version #11794, modified 2011-11-27 12:52:51 by NobbZ