Coder Social home page Coder Social logo

codox's Introduction

Codox

A tool for generating API documentation from Clojure or ClojureScript source code.

Usage

Leiningen

Include the following plugin in your project.clj file or your global profile:

:plugins [[lein-codox "0.10.8"]]

Then run:

lein codox

This will generate API documentation in the "target/doc" subdirectory (or wherever your project :target-path is set to).

Boot

Add boot-codox to your build.boot dependencies and require the namespace:

(set-env! :dependencies '[[boot-codox "0.10.8" :scope "test"]])
(require '[codox.boot :refer [codox]])

You can see the options available on the command line:

$ boot codox -h

or in the REPL:

boot.user=> (doc codox)

Remember to output files to the target directory with boot's built-in target task:

$ boot codox target

deps.edn

Add an alias to your deps.edn:

:codox {:extra-deps {codox/codox {:mvn/version "0.10.8"}}
        :exec-fn codox.main/generate-docs
        :exec-args {:source-paths ["path/to/src"]}}

When using deps.edn, project options should be added to the :exec-args map in your Codox alias, as above. This behavior differs from the examples in "Project Options" section, which use the Leiningen configuration format.

Run Codox via -X like this:

clojure -X:codox

Note: Codox expects the code it analyzes to be on the classpath so you may need to specify additional aliases from your project to make that happen, e.g., clojure -X:dev:codox.

Breaking Changes in 0.9

In preparation for a 1.0 release, Codox 0.9 has a number of breaking changes:

  • The Leiningen plugin has been changed from codox to lein-codox
  • The Leiningen task has been changed from lein doc to lein codox
  • The default output path has been changed from doc to target/doc
  • The :sources option has been renamed to :source-paths
  • The :output-dir option has been renamed to :output-path
  • The :defaults option has been renamed to :metadata
  • The :include and :exclude options have been replaced with :namespaces
  • All the :src-* options have been replaced with :source-uri

See the "Source Files" section for information on the :namespaces option, and the "Source Links" section for information on the :source-uri option.

Examples

Some examples of API docs generated by Codox in real projects:

AOT Compilation

AOT-compiled namespaces will lose their metadata, which mean you'll lose documentation for namespaces. Avoid having global :aot directives in your project; instead, place them in a specialized profile, such as :uberjar.

Project Options

Codox can generate documentation from Clojure or ClojureScript. By default it looks for Clojure source files, but you can change this to ClojureScript by setting the :language key:

:codox {:language :clojurescript}

Source Files

By default Codox looks for source files in the :source-paths of your project, but you can change this just for Codox by placing the following in your project.clj file:

:codox {:source-paths ["path/to/source"]}

The :namespaces option can be used to restrict the documentation to a specific set of namespaces:

:codox {:namespaces [library.core library.io]}

Regular expressions can also be used for more general matching:

:codox {:namespaces [#"^library\."]}

For excluding only internal namespaces, it's sometimes useful to use negative lookahead:

:codox {:namespaces [#"^library\.(?!internal)"]}

To override the namespaces list and include all namespaces, use :all (the default):

:codox {:namespaces :all}

The :exclude-vars option can be used to exclude vars that match a regular expression. Set to nil to disable. By default vars generated by record constructor functions are excluded (such as ->Foo and map->Foo):

:codox {:exclude-vars #"^(map)?->\p{Upper}"}

Codox constructs documentation from metadata on vars and namespaces. You can specify a set of default metadata using the :metadata map:

:codox {:metadata {:doc "FIXME: write docs"}}

Documentation Files

As well as source files, Codox also tries to include documentation files as well. By default it looks for these in the doc directory, but you can change this with:

:codox {:doc-paths ["path/to/docs"]}

Documentation files will appear in the output sorted by their filename. If you want a particular order, one solution is to prefix your files with 01, 02, etc. Alternatively, you can also define the documentation files explicitly:

:codox {:doc-files ["doc/intro.md", "doc/tutorial.md"]}

If :doc-files is specified, then :doc-paths is ignored. Currently only markdown files (.md or .markdown) are supported. Any links between markdown files will be converted to their HTML equivalents automatically.

Output Files

To write output to a directory other than the default, use the :output-path key:

:codox {:output-path "codox"}

To use a different output writer, specify the fully qualified symbol of the writer function in the :writer key:

:codox {:writer codox.writer.html/write-docs}

By default the writer will include the project name, version and description in the output. You can override these by specifying a :project map in your Codox configuration:

:codox {:project {:name "Example", :version "1.0", :description "N/A"}}

Note: when using deps.edn, these entries should be added to the top level of the Codox configuration map (i.e. not under :project).

Source Links

If you have the source available at a URI and would like to have links to the function's source file in the documentation, you can set the :source-uri key:

:codox {:source-uri "https://github.com/foo/bar/blob/{version}/{filepath}#L{line}"}

The URI is a template that may contain the following keys:

  • {filepath} - the file path from the root of the repository
  • {basename} - the basename of the file
  • {classpath} - the relative path of the file within the source directory
  • {line} - the line number of the source file
  • {version} - the version of the project
  • {git-commit} - the Git commit id of the repository

You can also assign different URI templates to different paths of your source tree. This is particularly useful for created source links from generated source code, such as is the case with cljx.

For example, perhaps your Clojure source files are generated in target/classes. To link back to the original .cljx file, you could do:

:codox
{:source-uri
 {#"target/classes" "https://github.com/foo/bar/blob/master/src/{classpath}x#L{line}"
  #".*"             "https://github.com/foo/bar/blob/master/{filepath}#L{line}"}}

HTML Transformations

The HTML writer can be customized using Enlive-style transformations. You can use these to modify the HTML documents produced in arbitrary ways, but the most common use is to add in new stylesheets or scripts.

The transforms live in the :transforms key, in the :html map, and consist of a vector that matches selectors to transformations, in the same way that let matches symbols to values.

For example, the following code adds a new <script> element as the last child of the <head> element:

:html {:transforms [[:head] [:append [:script "console.log('foo');"]]]}

The selectors follow the Enlive selector syntax.

The transformations are a little different. There are five transforms, :append, :prepend, :after, :before and :substitute. These match to the corresponding Enlive transformations, but expect Hiccup-style arguments.

HTML Output Options

The HTML writer also has one other customization option.

By default the namespace list is nested, unless there is only one namespace in the library. To override this, set the :namespace-list option in the :html map to either :nested or :flat.

:html {:namespace-list :flat}

Themes

Themes are HTML transformations packaged with resources. Because they're data-driven and based on transformation of the generated documentation, multiple themes can be applied. The default theme is :default. Themes can be added by changing the :themes key:

:themes [:my-custom-theme]

To create a theme, you'll need to place the following resource in the classpath, either directly in your project, or via a dependency:

codox/theme/my-custom-theme/theme.edn

This edn file should contain a map of two keys: :transforms and :resources.

The :transforms key contains an ordered collection of HTML transformations. See the previous section for more information on the syntax.

The :resources key contains a list of sub-resources that will be copied to the target directory when the documentation is compiled. For example, if you define a sub-resource css/main.css, then Codox will copy the resource codox/theme/foo/css/main.css to the file css/main.css in the target directory.

Themes can also take parameters. You can put in a keyword as a placeholder, and then end users can specify the value that should replace the keyword. This is achieved by using a vector instead of a keyword to specify the theme:

:themes [[keyword {placeholder value}]]

For example:

:themes [[:my-custom-theme {:some-value "foobar"}]]

Codox will look for the keyword :some-value in the theme file, and replace it with the string "foobar".

If you want to take a look at a complete theme, try the default theme for Codox.

Metadata Options

To force Codox to skip a public var, add :no-doc true to the var's metadata. For example:

;; Documented
(defn square
  "Squares the supplied number."
  [x]
  (* x x))

;; Not documented
(defn ^:no-doc hidden-square
  "Squares the supplied number."
  [x]
  (* x x))

You can also skip namespaces by adding :no-doc true to the namespace's metadata. This currently only works for Clojure code, not ClojureScript. For example:

(ns ^:no-doc hidden-ns)

To denote the library version the var was added in, use the :added metadata key:

(defn square
  "Squares the supplied number."
  {:added "1.0"}
  [x]
  (* x x))

Similar, deprecated vars can be denoted with the :deprecated metadata key:

(defn square
  "Squares the supplied number."
  {:deprecated "2.0"}
  [x]
  (* x x))

Docstring Formats

By default, docstrings are rendered by Codox as fixed-width plain text, as they would be on a terminal. However, you can override this behavior by specifying an explicit format for your docstrings.

Currently there are only two formats for docstrings: plaintext and markdown. The markdown format includes extensions for code blocks, tables, and, like the plaintext format, URLs are automatically encoded as links.

You can specify docstring formats via a var's metadata, using the :doc/format option:

(defn foo
  "A **markdown** formatted docstring."
  {:doc/format :markdown}
  [x])

Or you can specify the docstring format globally by adding it to the :metadata map in your project.clj file:

:codox {:metadata {:doc/format :markdown}}

Markdown docstrings also support wikilink-style relative links, for referencing other vars. Vars in the current namespace will be matched first, and then Codox will try and find a best match out of all the vars its documenting.

(defn bar
  "See [[foo]] and [[user/square]] for other examples."
  {:doc/format :markdown}
  [x])

Live Documentation

You can make the code in your documentation live and interactive by using the Klipse theme written by Yehonathan Sharvit. This third-party theme integrates the generated docs with the Klipse code evaluator.

License

Copyright © 2018 James Reeves

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

codox's People

Contributors

adamfrey avatar anmonteiro avatar atroche avatar camdez avatar ccfontes avatar cldwalker avatar davidsantiago avatar floybix avatar gfredericks avatar hugoduncan avatar ieure avatar ikappaki avatar jameslintaylor avatar lukateras avatar martinklepsch avatar metametadata avatar moea avatar moxaj avatar mtnygard avatar odyssomay avatar raynes avatar rm-hull avatar rwilson avatar sbauer322 avatar sritchie avatar tobias avatar tsulej avatar viebel avatar wactbprot avatar weavejester avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

codox's Issues

exclude anonymous types

reify generates anonymous types would should not appear in documentation. ClojureScript master now annotates the metadata of the var for these types with :anonymous set to true. It would be great if Codox could use this to exclude.

core/applied-migrations may produce a collection with nils

When applied migration ids are present but @defined-migrations is not, the result is

(map {} [1])
;= (nil)

This is an edge case with Joplin which has a feature that migrates down first, then up. I'm afraid Joplin cannot work around this, so the only
solution I see is to filter out nils in Ragtime.

A PR is coming.

Macros are not marked as such

I notice that autodoc would mark macros as macros (on the 2nd line under the signature, it would just say

macro

That's kind of nice, because ultimately it does matter for documentation purposes.

Error trying to use src-dir-uri

Setting :codox {:src-dir-uri "http://myStashUrl/projects/FXO/repos/xm/browse/xcore/"} and getting a failure on the doc run. Looks like the URI parser is getting forward slashes added as it runs through the files? I'm on a windows machine..............

at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.net.URISyntaxException: Illegal character in path at index 67: http://myStashUrl/projects/FXO/repos/xm/browse/xcore/dev\dev.clj
at java.net.URI$Parser.fail(Unknown Source)
at java.net.URI$Parser.checkChars(Unknown Source)
at java.net.URI$Parser.parseHierarchical(Unknown Source)
at java.net.URI$Parser.parse(Unknown Source)
at java.net.URI.(Unknown Source)
at hiccup.util$eval412$fn__413.invoke(util.clj:49)

disapearing ns docstrings

Hi Wavejester,

Codox is a great tool, I use it a lot for my projects. Thanks!

Recently, I have a small itch with it. Sometimes html docs do not contain namespace docstrings. It seems to be triggered by the aot option of lein.

I have created a sample minimal project that recovers the behaviour:

https://github.com/lopusz/codoxtest

When I do

rm -rf doc && lein do clean, doc

I have no ns docstrings

When I set aot to nil and redo

rm -rf doc && lein do clean, doc

the ns docstrings appear automagically.

I have included the sample output in the repo (doc_aot_all doc_aot_nil).

I run Linux + Leiningen 2.3.3 on Java 1.7.0_17 Java HotSpot(TM) 64-Bit Server VM.

Is it a bug or somehow a feature? Any hints?

Best regards,
Michal

`lein doc` from codox "0.6.2" onwards throws "java.lang.AssertionError: Assert failed: (vector? (:dependencies project []))"

Using codox "0.6.1" I can get docs for my project.
From codox "0.6.2" onwards, including 0.6.6, I get the following:

631 enda:orla2$ lein doc
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
Retrieving codox/codox/0.6.6/codox-0.6.6.pom from clojars
Retrieving codox/codox/0.6.6/codox-0.6.6.jar from clojars
Exception in thread "main" java.lang.AssertionError: Assert failed: (vector? (:dependencies project []))
    at leinjacker.deps$add_if_missing.invoke(deps.clj:43)
    at leiningen.doc$doc.invoke(doc.clj:16)
    at clojure.lang.Var.invoke(Var.java:415)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.core$apply.invoke(core.clj:619)
    at leiningen.core.main$resolve_task$fn__2962.doInvoke(main.clj:151)
    at clojure.lang.RestFn.invoke(RestFn.java:410)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.RestFn.applyTo(RestFn.java:132)
    at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:619)
    at leiningen.core.main$apply_task.invoke(main.clj:192)
    at leiningen.core.main$resolve_and_apply.invoke(main.clj:196)
    at leiningen.core.main$_main$fn__3025.invoke(main.clj:265)
    at leiningen.core.main$_main.doInvoke(main.clj:252)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.lang.Var.invoke(Var.java:415)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.core$apply.invoke(core.clj:617)
    at clojure.main$main_opt.invoke(main.clj:335)
    at clojure.main$main.doInvoke(main.clj:440)
    at clojure.lang.RestFn.invoke(RestFn.java:436)
    at clojure.lang.Var.invoke(Var.java:423)
    at clojure.lang.AFn.applyToHelper(AFn.java:167)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.main.main(main.java:37)

My project is otherwise (seemingly) OK when I set codox to "0.6.1":

lein doc
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
Retrieving codox/codox/0.6.1/codox-0.6.1.pom from clojars
Retrieving codox/codox.leiningen/0.6.1/codox.leiningen-0.6.1.pom from clojars
Retrieving codox/codox/0.6.1/codox-0.6.1.jar from clojars
Retrieving codox/codox.leiningen/0.6.1/codox.leiningen-0.6.1.jar from clojars
Retrieving codox/codox.core/0.6.1/codox.core-0.6.1.pom from clojars
Retrieving codox/codox.core/0.6.1/codox.core-0.6.1.jar from clojars
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8

The doc folder contains the expected HTML files.

My project.clj is (not very complete but ...):

(defproject orla2 "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :dependencies [[org.clojure/clojure "1.5.1"]
                 [clojurewerkz/gizmo "1.0.0-alpha3-SNAPSHOT"]
                 [org.clojure/tools.nrepl "0.2.3"]
                 [org.clojure/tools.cli "0.2.2"]]
  :plugins [[codox "0.6.1"]]
  :profiles {:dev {:dependencies [[org.clojure/tools.namespace "0.2.4"]]}}
  :source-paths ["src"]
  :resource-paths ["resources"]
  :main orla2.cli-entrypoint
  :codox {:sources ["src"]})

I tried bringing all codox dependencies up to the latest on clojars/maven-central, but it didn't help. Thoughts? Ideas?

Suggestion: live documentation

When working with documentation, I find that my cycle is very slow, as it takes >30 seconds to render the documentation for Rook; I'd love to see that speed up, but I also suspect the real problem is just JVM/Clojure startup and code compilation time.

It would be nice if there was a --watch option that would keep the doc task running, and would identify changes source files and regenerate output files as necessary ... or even expose a live HTTP server to connect to.

Support links to namespaces

For example, source like this:

  The default is no filter; however the [[io.aviso.repl]] namespace does supply a standard filter.

Generates:

<p>The default is no filter; however the <a href="null">io.aviso.repl</a> namespace does supply a standard filter.</p>

Observed in 0.8.8

Protocol functions source link broken

Protocol functions source links end up targeting the index.

You can see an example of the issue here on the encode function.

I am using 0.6.4 with the following setup in project.clj

  :codox {:src-dir-uri "https://github.com/mpenet/casyn/blob/master"
              :src-linenum-anchor-prefix "L"}

Running lein doc causes load fail for "codox.writer.html"

I just installed codox 0.8.7 as a plugin in lein. I'm using it from Eclipse on the Mac. When I run "lein doc", I get the following error:

Exception in thread "main" java.lang.Exception: Could not load codox writer codox.writer.html, compiling:(/private/var/folders/md/m3_rrv_11bd9dpv9rr02kgj00000gn/T/form-init5570118819814887329.clj:1:142)
at clojure.lang.Compiler.load(Compiler.java:7142)
at clojure.lang.Compiler.loadFile(Compiler.java:7086)
at clojure.main$load_script.invoke(main.clj:274)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invoke(main.clj:307)
at clojure.main$null_opt.invoke(main.clj:342)
at clojure.main$main.doInvoke(main.clj:420)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.lang.Exception: Could not load codox writer codox.writer.html
at codox.main$writer$fn__233.invoke(main.clj:13)
at codox.main$writer.invoke(main.clj:9)
at codox.main$generate_docs.invoke(main.clj:61)
at user$eval296.invoke(form-init5570118819814887329.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6703)
at clojure.lang.Compiler.eval(Compiler.java:6693)
at clojure.lang.Compiler.eval(Compiler.java:6693)
at clojure.lang.Compiler.load(Compiler.java:7130)
... 11 more
Caused by: java.lang.ExceptionInInitializerError, compiling:(codox/writer/html.clj:1:1)
at clojure.lang.Compiler.load(Compiler.java:7142)
at clojure.lang.RT.loadResourceScript(RT.java:370)
at clojure.lang.RT.loadResourceScript(RT.java:361)
at clojure.lang.RT.load(RT.java:440)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5066.invoke(core.clj:5641)
at clojure.core$load.doInvoke(core.clj:5640)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5446)
at clojure.core$load_lib$fn__5015.invoke(core.clj:5486)
at clojure.core$load_lib.doInvoke(core.clj:5485)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:626)
at clojure.core$load_libs.doInvoke(core.clj:5524)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:626)
at clojure.core$require.doInvoke(core.clj:5607)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at codox.main$writer$fn__233.invoke(main.clj:10)
... 18 more
Caused by: java.lang.ExceptionInInitializerError
at hiccup.core__init.load(Unknown Source)
at hiccup.core__init.(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at clojure.lang.RT.loadClassForName(RT.java:2093)
at clojure.lang.RT.load(RT.java:430)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5066.invoke(core.clj:5641)
at clojure.core$load.doInvoke(core.clj:5640)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5446)
at clojure.core$load_lib$fn__5015.invoke(core.clj:5486)
at clojure.core$load_lib.doInvoke(core.clj:5485)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:626)
at clojure.core$load_libs.doInvoke(core.clj:5528)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:628)
at clojure.core$use.doInvoke(core.clj:5618)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at codox.writer.html$eval300$loading__4958__auto____301.invoke(html.clj:1)
at codox.writer.html$eval300.invoke(html.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6703)
at clojure.lang.Compiler.eval(Compiler.java:6692)
at clojure.lang.Compiler.load(Compiler.java:7130)
... 36 more
Caused by: java.lang.IllegalStateException: html-mode already refers to: #'hiccup.util/html-mode in namespace: hiccup.compiler
at clojure.lang.Namespace.warnOrFailOnReplace(Namespace.java:88)
at clojure.lang.Namespace.intern(Namespace.java:72)
at clojure.lang.Var.intern(Var.java:158)
at clojure.lang.RT.var(RT.java:341)
at hiccup.core$html.(core.clj:7)
... 61 more

codox with cljx sources

It seems codox doesn't scan through .cljx sources yet. So I generated .clj sources in another directory, and created the docs from there. The problem is that, when using :src-dir-uri option for linking to the sources on github, clicking on Source link will direct to an inexistent page under the generated target directory, which of course doesn't exist.

Meanwhile, I will try to manually change the link to the correct directory after generating the docs.
Would it be nice to have an option to point to a sub-directory under :src-dir-uri like :rel-dir or something?

Update leinjacker dependency

The newer leinjacker dependency adds some compatibility for the latest lein version 2 running from git (which is what I use).

Without it, this error occurs:

∴ lein doc
Exception in thread "main" java.lang.AssertionError: Assert failed: (vector? (:dependencies project []))
        at leinjacker.deps$add_if_missing.invoke(deps.clj:43)
        at leiningen.doc$doc.invoke(doc.clj:16)
        at clojure.lang.Var.invoke(Var.java:415)
        at clojure.lang.AFn.applyToHelper(AFn.java:161)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:603)
        at leiningen.core.main$resolve_task$fn__1621.doInvoke(main.clj:132)
        at clojure.lang.RestFn.invoke(RestFn.java:410)
        at clojure.lang.AFn.applyToHelper(AFn.java:161)
        at clojure.lang.RestFn.applyTo(RestFn.java:132)
        at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:603)
        at leiningen.core.main$apply_task.invoke(main.clj:167)
        at leiningen.core.main$_main$fn__1680.invoke(main.clj:236)
        at leiningen.core.main$_main.doInvoke(main.clj:221)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.lang.Var.invoke(Var.java:415)
        at clojure.lang.AFn.applyToHelper(AFn.java:161)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:601)
        at clojure.main$main_opt.invoke(main.clj:324)
        at clojure.main$main.doInvoke(main.clj:427)
        at clojure.lang.RestFn.invoke(RestFn.java:436)
        at clojure.lang.Var.invoke(Var.java:423)
        at clojure.lang.AFn.applyToHelper(AFn.java:167)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.main.main(main.java:37)

Strangeness with def, defprotocol, and defrecord

Codox currently doesn't fully support protocols. It would be great to have the functions of a protocol grouped with the actual protocol.

Any use of defrecord will result in two different entries in the documentation (one being described as "Positional factory function for class tidbytes.constants.SomeTest." and the other "Factory function for class tidbytes.constants.SomeTest, taking a map of keywords to field values.").

Example producing both -->SomeTest and map->SomeTest:

(defrecord
  SomeTest
  [a])

root project source path problematic

Having a single source .clj file in the project root, if I do

:codox {:sources [""]}

no namespaces shows in index.html after lein doc.

Strangely enough, if I omit :sources, the docs are well generated except for the source links that point to an absolute path of my filesystem, like:

https://github.com/ccfontes/benrikuro/blob/master//Volumes/clojure/benrikuro/benrikuro.clj#L27

I'm trying to create API docs with this project.

All the problems go away if I put benrikuro.clj inside src.

AssertionError in a freshly created project

I am using Lein 2 on 32-bit Linux running Java 7. I get the following error when I run lein doc (I have [codox "0.6.4"] in :plugins vector in ~/.lein/profiles.clj) on a freshly created project:

Exception in thread "main" java.lang.AssertionError: Assert failed: (vector? (:dependencies project []))
    at leinjacker.deps$add_if_missing.invoke(deps.clj:43)
    at leiningen.doc$doc.invoke(doc.clj:16)
    at clojure.lang.Var.invoke(Var.java:415)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.core$apply.invoke(core.clj:603)
    at leiningen.core.main$resolve_task$fn__1606.doInvoke(main.clj:132)
    at clojure.lang.RestFn.invoke(RestFn.java:410)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.RestFn.applyTo(RestFn.java:132)
    at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:603)
    at leiningen.core.main$apply_task.invoke(main.clj:167)
    at leiningen.core.main$_main$fn__1665.invoke(main.clj:237)
    at leiningen.core.main$_main.doInvoke(main.clj:221)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.lang.Var.invoke(Var.java:415)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.core$apply.invoke(core.clj:601)
    at clojure.main$main_opt.invoke(main.clj:324)
    at clojure.main$main.doInvoke(main.clj:427)
    at clojure.lang.RestFn.invoke(RestFn.java:436)
    at clojure.lang.Var.invoke(Var.java:423)
    at clojure.lang.AFn.applyToHelper(AFn.java:167)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.main.main(main.java:37)

My project.clj looks as follows:

(defproject foo "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.4.0"]])

writer option not working with codox-md

Re: pull #8

I'm trying to run codox-md myself and the writer option seems to be ignored in codox version 0.6.6 - do you have any suggestions for how I could track this down?

relevant part of project.clj as follows:

  :dependencies [[org.clojure/clojure "1.5.1"]
                 [org.clojure/clojurescript "0.0-2080"]
                 [org.clojure/tools.macro "0.1.2"]
                 [com.datomic/datomic-free "0.8.4270" :scope "provided"]
                 [codox-md "0.2.0"]]

  :plugins [[lein-cljsbuild "1.0.0"]
            [codox "0.6.6"]]
  :codox {:src-dir-uri "http://github.com/clojure/core.logic/blob/master/"
          :writer codox-md.writer/write-docs
          :src-linenum-anchor-prefix "L"
          :exclude [clojure.core.logic.nominal.tests
                    clojure.core.logic.pldb.tests
                    clojure.core.logic.tests]}

If I don't include codox-md in the dependencies then I get an error

Exception in thread "main" java.lang.Exception: Could not load codox writer codox-md.writer
...
    at clojure.main.main(main.java:37)
Caused by: java.io.FileNotFoundException: Could not locate codox_md/writer__init.class or codox_md/writer.clj on classpath:
    at clojure.lang.RT.load(RT.java:443)
    at clojure.lang.RT.load(RT.java:411)

But if I do include it, it seems to be ignored in favour of the default template. I get the standard codox output in the doc folder, instead of the markdown version I'd expect.

java.lang.IllegalArgumentException: /tmp/form-init5038495816670430674.clj is not a relative path

I've got this exception during documentation generation:

Exception in thread "main" java.lang.IllegalArgumentException: /tmp/form-init5038495816670430674.clj is not a relative path
    at clojure.java.io$as_relative_path.invoke(io.clj:404)
    at clojure.java.io$file.invoke(io.clj:415)
    at codox.utils$find_file_in_repo$fn__32.invoke(utils.clj:23)
    at clojure.core$map$fn__4207.invoke(core.clj:2485)
    at clojure.lang.LazySeq.sval(LazySeq.java:42)
    at clojure.lang.LazySeq.seq(LazySeq.java:60)
    at clojure.lang.RT.seq(RT.java:484)
    at clojure.core$seq.invoke(core.clj:133)
    at clojure.core$filter$fn__4226.invoke(core.clj:2523)
    at clojure.lang.LazySeq.sval(LazySeq.java:42)
    at clojure.lang.LazySeq.seq(LazySeq.java:60)
    at clojure.lang.LazySeq.first(LazySeq.java:82)
    at clojure.lang.RT.first(RT.java:577)
    at clojure.core$first.invoke(core.clj:55)
    at codox.utils$find_file_in_repo.invoke(utils.clj:23)
    at codox.utils$add_source_paths$iter__44__48$fn__49$fn__55.invoke(utils.clj:70)
    at clojure.core$map$fn__4207.invoke(core.clj:2487)
    at clojure.lang.LazySeq.sval(LazySeq.java:42)
    at clojure.lang.LazySeq.seq(LazySeq.java:60)
    at clojure.lang.RT.seq(RT.java:484)
    at clojure.core$seq.invoke(core.clj:133)
    at clojure.core$map$fn__4207.invoke(core.clj:2479)
    at clojure.lang.LazySeq.sval(LazySeq.java:42)
    at clojure.lang.LazySeq.seq(LazySeq.java:60)
    at clojure.lang.RT.seq(RT.java:484)
    at clojure.core$seq.invoke(core.clj:133)
    at hiccup.element$unordered_list$iter__526__530$fn__531.invoke(element.clj:27)
    at clojure.lang.LazySeq.sval(LazySeq.java:42)
    at clojure.lang.LazySeq.seq(LazySeq.java:60)
    at clojure.lang.RT.seq(RT.java:484)
    at clojure.core$seq.invoke(core.clj:133)
    at clojure.core$map$fn__4207.invoke(core.clj:2479)
    at clojure.lang.LazySeq.sval(LazySeq.java:42)
    at clojure.lang.LazySeq.seq(LazySeq.java:60)
    at clojure.lang.RT.seq(RT.java:484)
    at clojure.core$seq.invoke(core.clj:133)
    at clojure.core$apply.invoke(core.clj:617)
    at hiccup.compiler$eval244$fn__245.invoke(compiler.clj:82)
    at hiccup.compiler$eval212$fn__213$G__203__218.invoke(compiler.clj:62)
    at clojure.core$map$fn__4207.invoke(core.clj:2485)
    at clojure.lang.LazySeq.sval(LazySeq.java:42)
    at clojure.lang.LazySeq.seq(LazySeq.java:60)
    at clojure.lang.RT.seq(RT.java:484)
    at clojure.core$seq.invoke(core.clj:133)
    at clojure.core$apply.invoke(core.clj:617)
    at hiccup.compiler$eval244$fn__245.invoke(compiler.clj:82)
    at hiccup.compiler$eval212$fn__213$G__203__218.invoke(compiler.clj:62)
    at hiccup.compiler$render_element.invoke(compiler.clj:72)
    at hiccup.compiler$eval248$fn__249.invoke(compiler.clj:79)
    at hiccup.compiler$eval212$fn__213$G__203__218.invoke(compiler.clj:62)
    at clojure.lang.Var.invoke(Var.java:415)
    at codox.writer.html$index_page$iter__651__655$fn__656.invoke(html.clj:68)
    at clojure.lang.LazySeq.sval(LazySeq.java:42)
    at clojure.lang.LazySeq.seq(LazySeq.java:60)
    at clojure.lang.Cons.next(Cons.java:39)
    at clojure.lang.RT.boundedLength(RT.java:1654)
    at clojure.lang.RestFn.applyTo(RestFn.java:130)
    at clojure.core$apply.invoke(core.clj:617)
    at codox.writer.html$index_page.invoke(html.clj:78)
    at codox.writer.html$write_index.invoke(html.clj:128)
    at codox.writer.html$write_docs.invoke(html.clj:139)
    at clojure.lang.Var.invoke(Var.java:415)
    at codox.main$generate_docs.invoke(main.clj:28)
    at user$eval114.invoke(form-init5038495816670430674.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:6619)
    at clojure.lang.Compiler.eval(Compiler.java:6609)
    at clojure.lang.Compiler.load(Compiler.java:7064)
    at clojure.lang.Compiler.loadFile(Compiler.java:7020)
    at clojure.main$load_script.invoke(main.clj:294)
    at clojure.main$init_opt.invoke(main.clj:299)
    at clojure.main$initialize.invoke(main.clj:327)
    at clojure.main$null_opt.invoke(main.clj:362)
    at clojure.main$main.doInvoke(main.clj:440)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:419)
    at clojure.lang.AFn.applyToHelper(AFn.java:163)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.main.main(main.java:37)

PS:
As result I got CSS and JS files in the "doc" directory without HTML files.

Watermark blocks namespaces links

Later versions have a watermark notice "done with codox" placed on top of the first two namespace links at the top left of the index page. Had to go back to 0.6.2. Credit where it's due but it messes up the clean design of the docs.

Suppressing documentation of record factory functions

Right now, if a record is in the namespace, codox creates documentation for all the factory functions for creating that record.

Is there a way to suppress that for some or all of the records, or to control the docstring that is printed for some of those functions (in order to make it clear the records are not meant to be instantiated with those factory functions)?

Responsive theme for Codox

Would you be interested in Codox having a responsive theme? On the iPhone, api docs are quite hard to read.

Generate docs only for subtree?

Given these example namespaces:

mysite.features.blog
mysite.features.store
mysite.features.contact
mysite.view.web
mysite.view.cli
mysite.db.datomic

is there a way to generate docs for every namespace under mysite.features without having to name each of them explicitly?

Highlight dynamic vars

A special marker for dynamic vars (with ^:dynamic) would be nice, as many APIs behavior hinges on such things.

LaTeX support

For one of my projects I extended codox to support LaTeX by using scilab's JLaTeXMath library. At the moment this is done by extending PegDown so it only works when Markdown is enabled. I wondered if there is interest for this feature?

Special markdown syntax for var links

It would be great if there was some special Markdown syntax to make links to vars in the same namespace, or into a namespace within the same source tree. It would be super great if it understood Clojure ns so I could just write something like:

 "Like [write-binary-delta] but returns the formatted string."

And [write-binary-delta] would be replaced with a link.

Suggestion: change default output to target/doc

Currently, codox generates documents under the doc directory, which is usually a git managed path. Generated content are better to be stored in target, so we don't have to ignore them manually. Rust's package manager cargo generates docs under target/, which I think is a better practice.

Exclude auto-generated fns in ClojureScript

As a few others have pointed out, defrecord and deftype generate functions that aren't present in the source. You can apparently use (alter-meta! #'->Foo assoc :no-doc true) to remove these from the docs. In ClojureScript, however, there are no vars, and this doesn't work. Is there a solution to this?

Included jquery.min.js does not match official release

There's a bit of corruption at this position:

&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),
                                ^

That's a raw \xA0 in the official jquery-1.6.4.min.js, but was converted into an ASCII space \x20 in codox.core/resources/codox/js/jquery.min.js

The latest minified jQuery does not have this annoyance; it is pure ASCII.

Apologies for the extreme nitpickery.

Source link doesn't include file name

Hi, thanks for the great tool.

I have my configuration as such:

  :codox {
    :sources ["src/fcms/resources"]
    :exclude [fcms.resources.collection-resource]
    :output-dir "../Falkland-CMS-docs/API/Clojure"
    :src-dir-uri "http://github.com/SnootyMonkey/Falkland-CMS/blob/master/"
    :src-linenum-anchor-prefix "L" ; for Github
  }

And the href of the source links are being generated with no file name, like such:

http://github.com/SnootyMonkey/Falkland-CMS/blob/master/#L30

The source-dir-uri part is there, as is the line number, but nothing for the file name.

Here is an example of the output: https://github.com/SnootyMonkey/Falkland-CMS/blob/gh-pages/API/Clojure/fcms.resources.item.html

Suggestion: meta data output

It would be nice if I could see the metadata on namespaces and var (my application is built on top of Rook which uses metadata extensively). I suspect you might want to edit out many of the standard metadata key.

Doesn't work at all

Not sure what is going on here. I added "0.6.3" to my user profile and tried this and it gives me this. My dependencies are definitely vectors. It happens in any project I use it in.

penumbra:laser raynes$ lein doc
Caused by: java.lang.AssertionError: Assert failed: (vector? (:dependencies project []))
    at leinjacker.deps$add_if_missing.invoke(deps.clj:43)
    at leiningen.doc$doc.invoke(doc.clj:16)
    at clojure.lang.Var.invoke(Var.java:415)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.core$apply.invoke(core.clj:603)
    at leiningen.core.main$resolve_task$fn__4897.doInvoke(main.clj:132)
    at clojure.lang.RestFn.invoke(RestFn.java:410)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.RestFn.applyTo(RestFn.java:132)
    at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:603)
    at leiningen.core.main$apply_task.invoke(main.clj:159)
    at leiningen.core.main$_main$fn__4955.invoke(main.clj:228)
    at leiningen.core.main$_main.doInvoke(main.clj:213)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.lang.Var.invoke(Var.java:415)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.core$apply.invoke(core.clj:601)
    at clojure.main$main_opt.invoke(main.clj:324)
    at clojure.main$main.doInvoke(main.clj:427)
    at clojure.lang.RestFn.invoke(RestFn.java:436)
    at clojure.lang.Var.invoke(Var.java:423)
    at clojure.lang.AFn.applyToHelper(AFn.java:167)
    at clojure.lang.Var.applyTo(Var.java:532)
    at clojure.main.main(main.java:37)
    ... 7 more

I'm using the latest leiningen from master.

penumbra:leiningen raynes$ git rev-parse HEAD
b4558ec274812e295ca86ae65f0ce658b0f29ab1

Exclude record auto-gen fns

When you use defrecord, it automatically creates two functions: ->Foo and map->Foo. I'd like to exclude these from my docs, but they don't seem to respond to metadata, either ^:private or ^:no-doc.

This is what I tried:

(defrecord ^:no-doc ^:private Foo [])

I really don't want those to be part of the public API as they would just be confusing. Is my only option to relocate them to another namespace and exclude that?

Thanks,
Matt

error with latest version while running `lein doc`

using "0.8.6"

Exception in thread "main" clojure.lang.ArityException: Wrong number of args (3) passed to: html/link-renderer/fn--879, compiling:(/tmp/form-init4950271137500489397.clj:1:90)
    at clojure.lang.Compiler.load(Compiler.java:7142)
    at clojure.lang.Compiler.loadFile(Compiler.java:7086)
    at clojure.main$load_script.invoke(main.clj:274)
    at clojure.main$init_opt.invoke(main.clj:279)
    at clojure.main$initialize.invoke(main.clj:307)
    at clojure.main$null_opt.invoke(main.clj:342)
    at clojure.main$main.doInvoke(main.clj:420)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:383)
    at clojure.lang.AFn.applyToHelper(AFn.java:156)
    at clojure.lang.Var.applyTo(Var.java:700)
    at clojure.main.main(main.java:37)
Caused by: clojure.lang.ArityException: Wrong number of args (3) passed to: html/link-renderer/fn--879
    at clojure.lang.AFn.throwArity(AFn.java:429)
    at clojure.lang.AFn.invoke(AFn.java:40)
    at codox.writer.html.proxy$org.pegdown.LinkRenderer$ff19274a.render(Unknown Source)
    at org.pegdown.ToHtmlSerializer.visit(ToHtmlSerializer.java:132)
    at org.pegdown.ast.ExpLinkNode.accept(ExpLinkNode.java:33)
    at org.pegdown.ToHtmlSerializer.visitChildren(ToHtmlSerializer.java:370)
    at org.pegdown.ToHtmlSerializer.visit(ToHtmlSerializer.java:353)
    at org.pegdown.ast.SuperNode.accept(SuperNode.java:43)
    at org.pegdown.ToHtmlSerializer.visitChildren(ToHtmlSerializer.java:370)
    at org.pegdown.ToHtmlSerializer.printTag(ToHtmlSerializer.java:382)
    at org.pegdown.ToHtmlSerializer.visit(ToHtmlSerializer.java:163)
    at org.pegdown.ast.ParaNode.accept(ParaNode.java:35)
    at org.pegdown.ToHtmlSerializer.visitChildren(ToHtmlSerializer.java:370)
    at org.pegdown.ToHtmlSerializer.visit(ToHtmlSerializer.java:91)
    at org.pegdown.ast.RootNode.accept(RootNode.java:51)
    at org.pegdown.ToHtmlSerializer.visitChildren(ToHtmlSerializer.java:370)
    at org.pegdown.ToHtmlSerializer.printTag(ToHtmlSerializer.java:382)
    at org.pegdown.ToHtmlSerializer.visit(ToHtmlSerializer.java:151)
    at org.pegdown.ast.ListItemNode.accept(ListItemNode.java:29)
    at org.pegdown.ToHtmlSerializer.visitChildren(ToHtmlSerializer.java:370)
    at org.pegdown.ToHtmlSerializer.printIndentedTag(ToHtmlSerializer.java:388)
    at org.pegdown.ToHtmlSerializer.visit(ToHtmlSerializer.java:106)
    at org.pegdown.ast.BulletListNode.accept(BulletListNode.java:29)
    at org.pegdown.ToHtmlSerializer.visitChildren(ToHtmlSerializer.java:370)
    at org.pegdown.ToHtmlSerializer.visit(ToHtmlSerializer.java:91)
    at org.pegdown.ast.RootNode.accept(RootNode.java:51)
    at org.pegdown.ToHtmlSerializer.toHtml(ToHtmlSerializer.java:72)
    at org.pegdown.PegDownProcessor.markdownToHtml(PegDownProcessor.java:157)
    at org.pegdown.PegDownProcessor.markdownToHtml(PegDownProcessor.java:151)
    at org.pegdown.PegDownProcessor.markdownToHtml(PegDownProcessor.java:124)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
    at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
    at codox.writer.html$eval883$fn__884.invoke(html.clj:53)
    at clojure.lang.MultiFn.invoke(MultiFn.java:236)
    at codox.writer.html$var_docs.invoke(html.clj:213)
    at codox.writer.html$namespace_page$iter__1286__1290$fn__1291.invoke(html.clj:226)
    at clojure.lang.LazySeq.sval(LazySeq.java:40)
    at clojure.lang.LazySeq.seq(LazySeq.java:49)
    at clojure.lang.Cons.next(Cons.java:39)
    at clojure.lang.RT.boundedLength(RT.java:1654)
    at clojure.lang.RestFn.applyTo(RestFn.java:130)
    at clojure.core$apply.invoke(core.clj:624)
    at codox.writer.html$namespace_page.invoke(html.clj:237)
    at codox.writer.html$write_namespaces.invoke(html.clj:255)
    at codox.writer.html$write_docs.invoke(html.clj:260)
    at clojure.lang.Var.invoke(Var.java:379)
    at codox.main$generate_docs.invoke(main.clj:68)
    at user$eval292.invoke(form-init4950271137500489397.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:6703)
    at clojure.lang.Compiler.eval(Compiler.java:6693)
    at clojure.lang.Compiler.load(Compiler.java:7130)
    ... 11 more
Subprocess failed

Add link to file in heading

When generating source, you can add links to the individual functions, but there isn't a top level link to go to the file itself. It would occasionally be handy to have this.

0.6.1 jar file is empty

[jweiss@blinky katello.auto]$ jar tvf lib/dev/codox-0.6.1.jar
78 Sat Mar 31 19:12:26 EDT 2012 META-INF/MANIFEST.MF
1514 Sat Mar 31 19:12:26 EDT 2012 META-INF/maven/codox/codox/pom.xml
86 Sat Mar 31 19:12:26 EDT 2012 META-INF/maven/codox/codox/pom.properties
162 Sat Mar 31 19:12:26 EDT 2012 project.clj

Codox should support namespace exclusions

Would it be possible to extend codox to support explicit namespace inclusions or exclusions? I'm looking to generate documentation for Cascalog, but don't want to include docs for the entire implementation, only the API. The project.clj key might look like this:

:codox {:sources ["src"]
              :namespaces [cascalog.api cascalog.ops]}

Cheers,
Sam

:added does not work on namespace

I would like to mark that an entier namespace was added in a particluar release; I'd expect to see "added in xxxx" next to the namespace name, but this doesn't happen.

publics without :doc meta are skipped

Hi all, now, from my understanding, we keep for generation only vars with documentation metadata.

I'd like to see all publics in generated documentation even if they are without :doc meta, for instance when signature of function is expressive enough.

My question is there a way to overcome this behaviour ?

multimethods not being picked up

I noticed that multimethods in my project were not being picked up by codox.

After some sleuthing, I narrowed it down to a bug in Clojure: https://groups.google.com/forum/?fromgroups=#!topic/clojure-dev/SDxQ3psN0ZM

However, there's a workaround: remove :reload from the require call in codox.reader:

https://github.com/weavejester/codox/blob/master/codox.core/src/codox/reader.clj#L37

The :reload isn't needed when using lein doc. I'm using a patched version of codox with this change.

I understand if you think it's not worth implementing the workaround, given that it's actually a bug in Clojure, but I thought I would let you know about it anyway since it may be a while before the bug gets fixed.

proxy not attached to any var sneaking into documentation

I'm getting an entry (with an invalid link) in my generated documentation for an internal proxy generated with a let and not intentionally attached to any var:

http://threatgrid.github.io/asynp/asynp.core.html#var-asynp.core.proxy%24java.lang.Object%24NuProcessHandler%2448aaa3b5

(should this change, the gh-pages commit is 493b7cd1c9ce95653eefb0dd109d5c3f2e370af3)

The code generating this is:

https://github.com/threatgrid/asynp/blob/db604b63fd2063ec3f0e50a10e5b6bf72df8f4fb/src/asynp/core.clj#L70

Multiple codox descriptions

I have a project using clojure for the server side and clojurescript for the client side.
And of course, I would like codox to be able to generate both documentations.

I did not find a way to do it so far.
And I was thinking that something like :

:codox [{:language :clojurescript
              :sources ["src/client"]
              :output-dir "doc/client"}
            {:language :clojure
             :sources ["src/server"]
             :output-dir "doc/server"}]

Could be awesome 😄
(and hopefully, not to hard to implement)

Or mm I missing a feature here?

Thanks in advance,
Benjamin Van Ryseghem

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.