Liking cljdoc? Tell your friends :D

cryogen-core.toc


compare-indexclj

(compare-index h1 h2)
source

generate-tocclj

(generate-toc html-dom {:keys [list-type toc-class]})

Reads an HTML string and parses it for headers, then returns a list of links to them.

A map of :list-type and :toc-class should be provided. :list-type can be one of :ul, :ol, or true. :ol and true will result in an ordered list being generated for the table of contents, while :ul will result in an unordered list. The default is an ordered list. :toc-class will be added to the top-level element (ie. ul.toc-class or ol.toc-class)

Reads an HTML string and parses it for headers, then returns a list of links
to them.

A map of :list-type and :toc-class should be provided.
 :list-type can be one of :ul, :ol, or true.
   :ol and true will result in an ordered list being generated for the table of
   contents, while :ul will result in an unordered list. The default is an
   ordered list.
 :toc-class will be added to the top-level element (ie. ul.toc-class or ol.toc-class)
sourceraw docstring

generate-toc*clj

(generate-toc* elements list-type toc-class)

The inner part of generate-toc. Takes maps of enlive-style html elements and returns hiccup.

The inner part of generate-toc. Takes maps of enlive-style html elements
and returns hiccup.
sourceraw docstring

get-headingsclj

(get-headings content)

Get all the headings in a sequence of enlive elements.

Get all the headings in a sequence of enlive elements.
sourceraw docstring

heading-indexclj

(heading-index heading)
source

headingsclj

source

toc-entryclj

(toc-entry anchor text)

Given an anchor link and some text, construct a toc entry consisting of link to the anchor using the given text, wrapped in an <li> tag.

Given an anchor link and some text, construct a toc entry
consisting of link to the anchor using the given text, wrapped
in an <li> tag.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close