Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Basic HTML documentation writer

  • Loading branch information...
commit 9811f6e1a6bf4a820b3bc54c9c19b278beb607d9 1 parent 2ff2211
James Reeves authored
Showing with 20 additions and 1 deletion.
  1. +2 −1  project.clj
  2. +18 −0 src/codox/writer/html.clj
3  project.clj
View
@@ -1,4 +1,5 @@
(defproject codox "0.0.1"
:description "Generate documentation from Clojure source files"
:dependencies [[org.clojure/clojure "1.2.1"]
- [org.clojure/tools.namespace "0.1.0"]])
+ [org.clojure/tools.namespace "0.1.0"]
+ [hiccup "0.3.7"]])
18 src/codox/writer/html.clj
View
@@ -0,0 +1,18 @@
+(ns codox.writer.html
+ "Documentation writer that outputs HTML."
+ (:use [hiccup core page-helpers]))
+
+(defn- make-index
+ [namespaces]
+ (html5
+ [:head
+ [:title "Documentation"]]
+ [:body
+ (for [namespace namespaces]
+ [:div.namespace
+ [:h1 (:name namespace)]])]))
+
+(defn write-docs
+ "Take raw documentation info and turn it into formatted HTML."
+ [info]
+ (spit "index.html" (make-index info)))
Please sign in to comment.
Something went wrong with that request. Please try again.