Skip to content

Commit 4ec275a

Browse files
authored
Revert to source link (#31)
1 parent 1e810dd commit 4ec275a

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

API.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ API namespace for quickdoc.
1111

1212

1313

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

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

3635
Returns a map containing the generated markdown string under the key `:markdown`.
36+
<br><sub><a href="https://github.com/borkdude/quickdoc/blob/main/src/quickdoc/api.cljc#L17-L80">source</a></sub>

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
Quick and minimal API doc generation for Clojure
66

7+
## Unreleased
8+
9+
- Revert source link in var title and move back to `<sub>`
10+
711
## v0.2.3
812

913
- Add `:filename-add-prefix` and `:filename-remove-prefix` options so quickdoc can more easily be configured from EDN

src/quickdoc/impl.clj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@
9898
ns-name
9999
(:name var)
100100
(:name var)))
101-
(println (format " [📃](%s)"
101+
;; I found the icon too big and drawing too much attention, so I reverted to
102+
;; printing the source link in a <sub> below again
103+
#_(println (format " [📃](%s)"
102104
(var-source var opts)))
103105
(println (format "<a name=\"%s/%s\"></a>"
104106
ns-name
@@ -126,8 +128,9 @@
126128
(println)
127129
(when (:macro var)
128130
(println "Macro.\n\n"))
129-
(print-docstring ns->vars ns-name doc opts)
130-
(when collapse-vars (println "</details>\n\n")))))
131+
(print-docstring ns->vars ns-name doc opts))
132+
(println (format "<br><sub><a href=\"%s\">source</a></sub>" (var-source var opts)))
133+
(when collapse-vars (println "</details>\n\n"))))
131134

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

0 commit comments

Comments
 (0)