Skip to content

Latest commit

 

History

History
196 lines (128 loc) · 4.75 KB

File metadata and controls

196 lines (128 loc) · 4.75 KB

quickblog.api

clean

(clean opts)

Removes cache and output directories
source

debug

(debug & xs)

source

migrate

(migrate opts)

Migrates from posts.edn to post-local metadata
source

new

(new opts)

Creates new file in posts dir.
source

quickblog

(quickblog opts)

Alias for render
source

refresh-templates

(refresh-templates opts)

Updates to latest default templates
source

render

(render opts)

Renders posts declared in posts.edn to out-dir.
source

serve

(serve opts)
(serve opts block?)

Runs file-server on port. If block? is falsey, returns a zero-arity stop-server! function that will stop the server when called.
source

unwatch

(unwatch watchers)

Stops each watcher in the list of watchers.
source

update-cache-dir

(update-cache-dir opts)

source

watch

(watch opts)

Watches posts, templates, and assets for changes. Runs file server using serve (unless the :serve opt is false). If the :block opt is false, returns a list of watchers that can be passed to unwatch to stop watching.
source

quickblog.cli

-main

(-main & args)

source

dispatch

(dispatch)
(dispatch default-opts & args)

source

run

(run default-opts)

Meant to be called using clj -M:quickblog; see Quickstart > Clojure in README
source

quickblog.internal.frontmatter

flatten-metadata

(flatten-metadata metadata)

Given a list of maps which contain a single key/value, flatten them all into a single map with all the leading spaces removed. If an empty list is provided then return nil.
source

parse-edn-metadata-headers

(parse-edn-metadata-headers lines-seq)

source

parse-metadata-headers

(parse-metadata-headers lines-seq)

Given a sequence of lines from a markdown document, attempt to parse a metadata header if it exists. Accepts wiki, yaml, and edn formats. Returns the parsed headers number of lines the metadata spans
source

parse-metadata-line

(parse-metadata-line line)

Given a line of metadata header text return either a list containing a parsed and normalizd key and the original text of the value, or if no header is found (this is a continuation or new value from a pervious header key) simply return the text. If a blank or invalid line is found return nil.
source

parse-wiki-metadata-headers

(parse-wiki-metadata-headers lines-seq)

source

parse-yaml-metadata-headers

(parse-yaml-metadata-headers lines-seq)

source