            (com.vladsch.flexmark.ext.wikilink WikiLinkExtension)
            (com.vladsch.flexmark.util.options MutableDataSet)))
 
+(defn as-url [str]
+  (-> str
+      (string/lower-case)
+      (string/replace  #"[ &,?]" {" " "-"
+                                  "," ""
+                                  "&" "and"
+                                  "?" "_q"})))
+
+(defn wiki-link
+  [function-name category subcategory]
+  (str "/api"
+       (when category (str "/" (as-url category)))
+       (when subcategory (str "/" (as-url subcategory)))
+       "#"
+       function-name))
+
 (def md-extensions
   [(TablesExtension/create)
    (AutolinkExtension/create)

            (reify LinkResolver
              (resolveLink [_this _node _ctx link]
                (if (= (.getLinkType link) WikiLinkExtension/WIKI_LINK)
                  (ResolvedLink. LinkType/LINK
                                 (.getUrl link)
                                 nil
                                 LinkStatus/UNCHECKED)
                  link))))))
      (extensions md-extensions)
      (build)))

(defn markdown-to-html
  "Parse the given string as Markdown and return HTML."
  [markdown]
  (->> (.parse md-container markdown)
       (.render (md-renderer))))

(defn read-all [file feature]
  (let [reader (->> file

  (filter #(-> % second meta (contains? :category))
          all-forms))

(defn get-full-meta [function->category-info [type name docstring args :as form]]
  (let [mt (meta name)
        args (if (vector? args)
               #{args}
