Functions to extract useful information from a project's Git repo
Cljdoc operates on source files as well as a project's Git repository to build API documentation and articles.
Functions to extract useful information from a project's Git repo Cljdoc operates on source files as well as a project's Git repository to build API documentation and articles.
Functions to operate on cache bundles
Functions to operate on cache bundles
Process doctrees provided by projects via a doc/cljdoc.edn
file.
Projects can provide a tree of articles via the :cljdoc.doc/tree
key.
The data that's provided via this key roughly follows the familiar Hiccup format:
[["Readme" {:file "Readme.md"}
["Child Of Readme" {:file "child.md"}]]]
Reading the files that are specified in this tree is outside of the
concern of this namespace and handled via a passed-in function slurp-fn
.
Usually this function will read the specified file from a Git repository
at a specified revision. This was done to keep this namespace free of any
Git/IO-related aspects.
The return format is described in the ::doctree
spec that's part of this namespace.
There also is some additional code derive-toc
that will return a
doctree based on a list of files. This is used to derive the doctree
for projects that haven't provided one explicitly.
Process doctrees provided by projects via a `doc/cljdoc.edn` file. Projects can provide a tree of articles via the `:cljdoc.doc/tree` key. The data that's provided via this key roughly follows the familiar Hiccup format: [["Readme" {:file "Readme.md"} ["Child Of Readme" {:file "child.md"}]]] Reading the files that are specified in this tree is outside of the concern of this namespace and handled via a passed-in function `slurp-fn`. Usually this function will read the specified file from a Git repository at a specified revision. This was done to keep this namespace free of any Git/IO-related aspects. The return format is described in the `::doctree` spec that's part of this namespace. There also is some additional code `derive-toc` that will return a doctree based on a list of files. This is used to derive the doctree for projects that haven't provided one explicitly.
Utilities to work with API information about different platforms
Most of the time a function/namespace will have identical metadata when defined in Clojure and ClojureScript but sometimes they don't.
This namespace provides a MultiPlatform
record that aims to expose
a thing (namespace, var)'s properties while also retaining and exposing
information about platform differences.
Utilities to work with API information about different platforms Most of the time a function/namespace will have identical metadata when defined in Clojure and ClojureScript but sometimes they don't. This namespace provides a `MultiPlatform` record that aims to expose a thing (namespace, var)'s properties while also retaining and exposing information about platform differences.
Functions related to rendering API documenation
Functions related to rendering API documenation
HTML fragments related to rendering articles and article-trees
HTML fragments related to rendering articles and article-trees
HTML pages/fragments related to requesting a documentation build
HTML pages/fragments related to requesting a documentation build
Hiccup rendering functions for index pages.
These pages are used when switching between versions or browsing all artifacts under a specific group-id.
Hiccup rendering functions for index pages. These pages are used when switching between versions or browsing all artifacts under a specific group-id.
Components to layout cljdoc pages
Components to layout cljdoc pages
Rendering code for offline bundles.
While more reuse would be possible this is intentionally kept somewhat separately as DOM stability is more important for tools like Dash etc.
Rendering code for offline bundles. While more reuse would be possible this is intentionally kept somewhat separately as DOM stability is more important for tools like Dash etc.
A collection of small helpers to ingest data provided via API analysis
or Git repositories into the database (see cljdoc.storage.api
)
A collection of small helpers to ingest data provided via API analysis or Git repositories into the database (see [[cljdoc.storage.api]])
Weaves together the various HTTP components of cljdoc.
Routing and HTTP concerns are handled via Pedestal and
endpoints are implemented as intereceptors.
For more details on routing see cljdoc.server.routes
.
The main aspects handlded via HTTP (and thus through this namespace) are:
view
)show-build
& all-builds
)sitemap-interceptor
)request-build
, [[full-build]] & [[circle-ci-webhook]])version-resolve-redirect
& jump-interceptor
)Weaves together the various HTTP components of cljdoc. Routing and HTTP concerns are handled via Pedestal and endpoints are implemented as [intereceptors](http://pedestal.io/reference/interceptors). For more details on routing see [[cljdoc.server.routes]]. The main aspects handlded via HTTP (and thus through this namespace) are: - Rendering documentation pages (see [[view]]) - Rendering build logs (see [[show-build]] & [[all-builds]]) - Rendering a sitemap (see [[sitemap-interceptor]]) - Handling build requests (see [[request-build]], [[full-build]] & [[circle-ci-webhook]]) - Redirecting to newer releases (see [[version-resolve-redirect]] & [[jump-interceptor]])
Based on this excellent guide: http://pedestal.io/guides/hello-world-content-types
Based on this excellent guide: http://pedestal.io/guides/hello-world-content-types
Pedestals routing is pretty nice but tying the routing table too much to the handlers can be annoying when trying to generate routes outside of a Pedestal server (e.g. when rendering files statically.)
This namespace lists all routes of cljdoc and exposes some utility functions to generate URLs given the routing information.
With some more work this could probably also be used from ClojureScript.
For use with http handlers a route-resolver
can be passed when
generating all routes. See docstring of routes
for details.
Pedestals routing is pretty nice but tying the routing table too much to the handlers can be annoying when trying to generate routes outside of a Pedestal server (e.g. when rendering files statically.) This namespace lists all routes of cljdoc and exposes some utility functions to generate URLs given the routing information. With some more work this could probably also be used from ClojureScript. For use with http handlers a `route-resolver` can be passed when generating all routes. See docstring of `routes` for details.
A protocol to abstract storage over cljdoc's storage backend.
This has been put into place when migrating from one storage backend to another and now largely puts some constraints on how the database is accessed, making access more structured.
The basic datamodel is Group > Artifact > Version. Namespaces and vars are linked against versions.
A protocol to abstract storage over cljdoc's storage backend. This has been put into place when migrating from one storage backend to another and now largely puts some constraints on how the database is accessed, making access more structured. The basic datamodel is Group > Artifact > Version. Namespaces and vars are linked against versions.
Utility functions :)
These are available in the analysis environment and thus should work without any additional dependencies or further assumptions about what's on the classpath.
Utility functions :) These are available in the analysis environment and thus should work without any additional dependencies or further assumptions about what's on the classpath.
Helpers function to work with dates and times.
Helpers function to work with dates and times.
Utilities to fix broken references in HTML that was intended to be rendered in other places, e.g. GitHub.
Utilities to fix broken references in HTML that was intended to be rendered in other places, e.g. GitHub.
Utilities to extract information from SCM urls (GitHub et al)
Utilities to extract information from SCM urls (GitHub et al)
Provides SQLCache
, an implementation of clojure.core.cache/CacheProtocol
.
It is used with clojure.core.memoize/PluggableMemoization
This namespace exposes memo-sqlite
function which takes a
function to memoize and cache-spec, it retuns the memoized function.
This function uses the SQLCache
for memoization.
Provides `SQLCache`, an implementation of `clojure.core.cache/CacheProtocol`. It is used with `clojure.core.memoize/PluggableMemoization` This namespace exposes `memo-sqlite` function which takes a function to memoize and cache-spec, it retuns the memoized function. This function uses the `SQLCache` for memoization.
Some helpers to be notified about builds queued so that I can investigate when/if stuff fails
Some helpers to be notified about builds queued so that I can investigate when/if stuff fails
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close