(clean dom)
(clean elt dom)
Return a dom like this dom
but with those elements which (could) have
been used to extract meta-data removed.
Return a dom like this `dom` but with those elements which (could) have been used to extract meta-data removed.
(file-attribute file-path attribute)
Return the value of the specified attribute
of the file at file-path
in the current default file system. The argument attribute
may be passed
as a keyword or a string, but must be an attribute name understood be
java.nio.file.Files
.
Return the value of the specified `attribute` of the file at `file-path` in the current default file system. The argument `attribute` may be passed as a keyword or a string, but must be an attribute name understood be `java.nio.file.Files`.
(infer-author page config)
Infer the ordinary everyday name of the author of this page
, given this
config
.
Infer the ordinary everyday name of the author of this `page`, given this `config`.
(infer-date page config)
The date is to be inferred from
dddd-dd-dd
; orThe date is to be inferred from 1. the prefix of the basename of the file, if it matches `dddd-dd-dd`; or 2. the creation date of the file, otherwise.
(infer-file-name page meta config)
The general pattern for Cryogen post names is date in yyyy-mm-dd
format,
followed by hyphen, followed by the title of the post lower-cased and with
hyphens substituted for spaces.
The general pattern for Cryogen post names is date in `yyyy-mm-dd` format, followed by hyphen, followed by the title of the post lower-cased and with hyphens substituted for spaces.
(infer-image-data dom config)
Infer image data given this dom
representation.
Infer image data given this `dom` representation.
(infer-meta page config dom)
Infer metadata related to this page
, assumed to be the name of a file in
this markup
, given this config
.
Infer metadata related to this `page`, assumed to be the name of a file in this `markup`, given this `config`.
(infer-tags dom)
Return a sequence of all tags found in this dom
.
Return a sequence of all tags found in this `dom`.
Infer the title of this page, ideally by extracting the first H1
element from this
dom
(Document Object Model) of its content, given this config
.
Infer the title of this page, ideally by extracting the first `H1` element from this `dom` (Document Object Model) of its content, given this `config`.
(main-title dom)
Return the content of the first h1
element of this dom
, if any.
Return the content of the first `h1` element of this `dom`, if any.
(main-title? elt dom)
true
if this elt
is the main title taken from this dom
.
`true` if this `elt` is the main title taken from this `dom`.
(tag-line? elt)
true
if this elt
taken from a dom is a line starting with a strongly-emphasised
string Tag:
?
`true` if this `elt` taken from a dom is a line starting with a strongly-emphasised string `Tag:`?
(using-inferred-metadata page markup config)
An implementation of the guts of cryogen-core.compiler.page-content
for
pages without embedded metadata. Read this page
in this markup
, given
this config
and, it possible, return a map with the keys :file-name
,
:page-meta
, :content-dom
where the value of :page-meta
is appropriate
meta-data inferred from the content of the page.
An implementation of the guts of `cryogen-core.compiler.page-content` for pages without embedded metadata. Read this `page` in this `markup`, given this `config` and, it possible, return a map with the keys `:file-name`, `:page-meta`, `:content-dom` where the value of `:page-meta` is appropriate meta-data inferred from the content of the page.
(walk-dom dom)
Return a flat sequence of all elements in this dom
structure, recursively.
Return a flat sequence of all elements in this `dom` structure, recursively.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close