Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert to source link #31

Merged
merged 9 commits into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ API namespace for quickdoc.



## <a name="quickdoc.api/quickdoc">`quickdoc`</a> [📃](https://github.com/borkdude/quickdoc/blob/main/src/quickdoc/api.cljc#L17-L80)
<a name="quickdoc.api/quickdoc"></a>
## <a name="quickdoc.api/quickdoc">`quickdoc`</a><a name="quickdoc.api/quickdoc"></a>
``` clojure

(quickdoc opts)
Expand All @@ -34,3 +33,4 @@ Generate API docs. Options:
* `:filename-fn` - transformation of filename before it is rendered to markdown, e.g. for source links.

Returns a map containing the generated markdown string under the key `:markdown`.
<br><sub><a href="https://github.com/borkdude/quickdoc/blob/main/src/quickdoc/api.cljc#L17-L80">source</a></sub>
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

Quick and minimal API doc generation for Clojure

## Unreleased

- Revert source link in var title and move back to `<sub>`

## v0.2.3

- Add `:filename-add-prefix` and `:filename-remove-prefix` options so quickdoc can more easily be configured from EDN
Expand Down
9 changes: 6 additions & 3 deletions src/quickdoc/impl.clj
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@
ns-name
(:name var)
(:name var)))
(println (format " [📃](%s)"
;; I found the icon too big and drawing too much attention, so I reverted to
;; printing the source link in a <sub> below again
#_(println (format " [📃](%s)"
(var-source var opts)))
(println (format "<a name=\"%s/%s\"></a>"
ns-name
Expand Down Expand Up @@ -126,8 +128,9 @@
(println)
(when (:macro var)
(println "Macro.\n\n"))
(print-docstring ns->vars ns-name doc opts)
(when collapse-vars (println "</details>\n\n")))))
(print-docstring ns->vars ns-name doc opts))
(println (format "<br><sub><a href=\"%s\">source</a></sub>" (var-source var opts)))
(when collapse-vars (println "</details>\n\n"))))

(defn print-namespace [ns-defs ns->vars ns-name vars opts overrides]
(let [ns (get-in ns-defs [ns-name 0])
Expand Down