diff --git a/refpolicy/doc/templates/header.html b/refpolicy/doc/templates/header.html
new file mode 100644
index 0000000..9ef487c
--- /dev/null
+++ b/refpolicy/doc/templates/header.html
@@ -0,0 +1,15 @@
+
+
+
+ Security Enhanced Linux Reference Policy
+
+
+
+
+
+[[menu]]
+
+[[content]]
+
+
+
diff --git a/refpolicy/doc/templates/interface.html b/refpolicy/doc/templates/interface.html
new file mode 100644
index 0000000..0a96a11
--- /dev/null
+++ b/refpolicy/doc/templates/interface.html
@@ -0,0 +1,42 @@
+
+
[[interface_name]]
+
+
+[[exec i = 0]]
+[[interface_name]](
+ [[for arg in interface_parameters]]
+ [[if i != 0]]
+ ,
+ [[end]]
+ [[exec i = 1]]
+ [[if arg['optional'] == 'true']]
+ [
+ [[end]]
+ [[arg['name']]]
+ [[if arg['optional'] == 'true']]
+ ]
+ [[end]]
+ [[end]]
+ )
+
+
+
+
Description
+[[interface_desc]]
+
Parameters:
+
+
+Parameter: | Description: | Optional: |
+[[for arg in interface_parameters]]
+
+[[arg['name']]]
+ |
+[[arg['desc']]]
+ |
+[[arg['optional']]]
+ |
+[[end]]
+
+
+
+
diff --git a/refpolicy/doc/templates/menu.html b/refpolicy/doc/templates/menu.html
new file mode 100644
index 0000000..cd7ae8e
--- /dev/null
+++ b/refpolicy/doc/templates/menu.html
@@ -0,0 +1,12 @@
+
diff --git a/refpolicy/doc/templates/module.html b/refpolicy/doc/templates/module.html
new file mode 100644
index 0000000..c23ab65
--- /dev/null
+++ b/refpolicy/doc/templates/module.html
@@ -0,0 +1,6 @@
+Layer: [[mod_layer]]
+Module: [[mod_name]]
+Summary: [[mod_summary]]
+
+Interfaces:
+[[interfaces]]
diff --git a/refpolicy/doc/templates/module_list.html b/refpolicy/doc/templates/module_list.html
new file mode 100644
index 0000000..e56c925
--- /dev/null
+++ b/refpolicy/doc/templates/module_list.html
@@ -0,0 +1,16 @@
+[[if mod_layer]]
+Layer: [[mod_layer]]
+[[end]]
+
+Module: | Description: |
+ [[for layer_name, layer_mods in menulist.iteritems()]]
+ [[for module, s in layer_mods.iteritems()]]
+
+
+ [[module]] |
+ [[s]] |
+ [[end]]
+
+ [[end]]
+
+
diff --git a/refpolicy/doc/templates/style.css b/refpolicy/doc/templates/style.css
new file mode 100644
index 0000000..e865be1
--- /dev/null
+++ b/refpolicy/doc/templates/style.css
@@ -0,0 +1,174 @@
+body {
+ margin:0px;
+ padding:0px;
+ font-family:verdana, arial, helvetica, sans-serif;
+ color:#333;
+ background-color:white;
+ }
+h1 {
+ margin:0px 0px 15px 0px;
+ padding:0px;
+ font-size:28px;
+ line-height:28px;
+ font-weight:900;
+ color:#ccc;
+ }
+h2 {
+ font-size:100%;
+ }
+h3 {
+ font-size:75%;
+ }
+h4 {
+ font-size:67%;
+ }
+li {
+ font:11px/20px verdana, arial, helvetica, sans-serif;
+ margin:0px 0px 0px 0px;
+ padding:0px;
+ }
+p {
+ /* normal */
+ font:11px/20px verdana, arial, helvetica, sans-serif;
+ margin:0px 0px 16px 0px;
+ padding:0px;
+ }
+
+tt {
+ /* inline code */
+ font-family: monospace;
+ }
+
+table {
+ background-color:#eee;
+ /*background-color: white;*/
+ border-style:solid;
+ border-color:black;
+ border-width:0px 1px 1px 0px;
+ color: black;
+ text-align: left;
+ font:11px/20px verdana, arial, helvetica, sans-serif;
+ margin-left: 5%;
+ margin-right: 5%;
+}
+
+th {
+ background-color: #eaeaff;
+ text-align: center;
+}
+
+td.header {
+ font-weight: bold;
+}
+
+#Content>p {margin:0px;}
+#Content>p+p {text-indent:30px;}
+a {
+ color:#09c;
+ font-size:11px;
+ text-decoration:none;
+ font-weight:600;
+ font-family:verdana, arial, helvetica, sans-serif;
+ }
+a:link {color:#09c;}
+a:visited {color:#07a;}
+a:hover {background-color:#eee;}
+
+#Codeblock {
+ margin:5px 50px 5px 50px;
+ padding:5px 0px 5px 15px;
+ border-style:solid;
+ border-color:lightgrey;
+ border-width:1px 1px 1px 1px;
+ background-color:#f5f5ff;
+ font-size:11px;
+ font-weight:600;
+ text-decoration:none;
+ font-family:courier;
+}
+#Interface {
+ margin:5px 0px 25px 5px;
+ padding:5px 5px 5px 5px;
+ border-style:solid;
+ border-color:black;
+ border-width:1px 1px 1px 1px;
+ background-color:#fafafa;
+ font-size:14px;
+ font-weight:400;
+ text-decoration:none;
+ font-family:verdana, arial, helvetica, sans-serif;
+}
+#Description {
+ margin:0px 0px 0px 5px;
+ padding:0px 0px 0px 5px;
+ text-decoration:none;
+ font-family:verdana, arial, helvetica, sans-serif;
+ font-size:12px;
+ font-weight:400;
+}
+pre {
+ font-size:11px;
+ font-weight:600;
+ text-decoration:none;
+ font-family:courier;
+}
+pre.codeblock {
+ /* code block (bordered, slight gray background) */
+ border-style:solid;
+ border-color:black;
+ border-width:1px 1px 1px 1px;
+ background-color:#f8f8f8;
+ margin-left: 10%;
+ margin-right: 10%;
+}
+dl {
+ /* definition text block */
+ font:11px/20px verdana, arial, helvetica, sans-serif;
+ margin:0px 0px 16px 0px;
+ padding:0px;
+ }
+dt {
+ /* definition term */
+ font-weight: bold;
+ }
+
+#Header {
+ margin:50px 0px 10px 0px;
+ padding:17px 0px 0px 20px;
+ /* For IE5/Win's benefit height = [correct height] + [top padding] + [top and bottom border widths] */
+ height:33px; /* 14px + 17px + 2px = 33px */
+ border-style:solid;
+ border-color:black;
+ border-width:1px 0px; /* top and bottom borders: 1px; left and right borders: 0px */
+ line-height:11px;
+ font-size:110%;
+ background-color:#eee;
+ voice-family: "\"}\"";
+ voice-family:inherit;
+ height:14px; /* the correct height */
+ }
+body>#Header {height:14px;}
+#Content {
+ margin:0px 50px 50px 200px;
+ padding:10px;
+ }
+
+#Menu {
+ position:absolute;
+ top:100px;
+ left:20px;
+ width:162px;
+ padding:10px;
+ background-color:#eee;
+ border:1px solid #aaa;
+ line-height:17px;
+ text-align:left;
+ voice-family: "\"}\"";
+ voice-family:inherit;
+ width:160px;
+ }
+#Menu subitem {
+ font-size: 5px;
+}
+
+body>#Menu {width:160px;}