marginalia
marginalia copied to clipboard
Allow a header doc
Marg currently processes each file in turn generating the docs in order. However, it would be nice to allow the specification of a documentation header that is always placed at the top of the documentation. This could be a license statement, logo, manifesto, etc. I'm not sure how this would look at the moment, so any suggestions are welcomed.
I recently started looking at Marg, and this is one of the things I greatly miss.
Wouldn't it be possible to (re)use the :main ns in project.clj for this purpose? And instead of putting the file comments in the ns specified by :main into it's own block, it'd be moved to the top, just below "namespaces" ?
So one could have a project.clj like the following:
(defproject example "0.0.0-SNAPSHOT"
:description "An example project"
:dev-dependencies [[lein-marginalia "0.6.0"]]
:main example.core
)
And in src/example/core.clj:
;; ## An Example project
;;
;; Blah blah blah....
(ns example.core)
(defn say-hello "Says 'Hello!'" [] (println "Hello!"))
And this would result in src/example/core.clj's file header being used as the header doc.
I would include README.md at the top. In place of text "(this space intentionally left almost blank)"