You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.adoc
+34
Original file line number
Diff line number
Diff line change
@@ -2305,6 +2305,40 @@ When talking about vars - items in the same namespace don't need to fully qualif
2305
2305
NOTE: Many Clojure programming tools will also try to extract references to other vars from the docstring, but it's both
2306
2306
simpler and more explicit to use the `:see-also` metadata instead.
2307
2307
2308
+
=== `:no-doc`
2309
+
2310
+
Documentation tools like https://github.com/weavejester/codox#metadata-options[Codox] like https://github.com/cljdoc/cljdoc/blob/master/doc/userguide/for-library-authors.adoc#hiding-namespaces-vars-in-documentation[cljdoc] recognize `:no-doc` metadata.
2311
+
When a var or a namespace has `:no-doc` metadata, it indicates to these tools that it should be excluded from generated API docs.
2312
+
2313
+
To exclude an entire namespace from API docs:
2314
+
[source,clojure]
2315
+
----
2316
+
(ns ^:no-doc my-library.impl
2317
+
"Internal implementation details")
2318
+
2319
+
...
2320
+
----
2321
+
2322
+
To exclude vars within a documented namespace:
2323
+
[source,clojure]
2324
+
----
2325
+
(ns my-library.api)
2326
+
2327
+
;; private functions do not get documented
2328
+
(defn- clearly-private []
2329
+
...)
2330
+
2331
+
;; nor do public functions with :no-doc metadata
2332
+
(defn ^:no-doc shared-helper []
2333
+
...)
2334
+
2335
+
;; this function will be documented
2336
+
(defn api-fn1
2337
+
"I am useful to the public"
2338
+
[]
2339
+
...)
2340
+
----
2341
+
2308
2342
=== Indentation Metadata
2309
2343
2310
2344
Unlike other Lisp dialects, Clojure doesn't have a standard metadata format to specify the indentation of macros.
0 commit comments