Fabricate API

A complete listing of the API provided by the Fabricate Clojure library.

site.fabricate.api

Fabricate's public API. This contains the core set of operations that Fabricate uses to produce a website from input files.

assemble

site.fabricate.api/assemble

Prepare the entries for `produce!` by calling `build` on each entry, then running `tasks` on the results.

Type
Function
Arguments
[tasks
{:keys [site.fabricate.api/entries
site.fabricate.api/options]

:as site}
]
Source
site/fabricate/api.clj

build

site.fabricate.api/build

Generate structured (EDN) document content for an entry from a source format. Takes an entry and returns a document (entry).

Type
Multimethod
Source
site/fabricate/api.clj

build-dispatch

site.fabricate.api/build-dispatch

Return the source and document formats for an entry.

Type
Function
Arguments
[entry options]
Source
site/fabricate/api.clj

collect

site.fabricate.api/collect

Generate the input entries from a source.

Type
Multimethod
Source
site/fabricate/api.clj

construct!

site.fabricate.api/construct!

Run the tasks necessary to complete the website. Execute `produce` on every page, then run `tasks`.

Type
Function
Arguments
[tasks
{:keys [site.fabricate.api/entries
site.fabricate.api/options]

:as init-site}
]
Source
site/fabricate/api.clj

entry-schema

site.fabricate.api/entry-schema

Malli schema describing entries.

Type
Constant
Source
site/fabricate/api.clj

glossary

site.fabricate.api/glossary

Key terms used by Fabricate.

Type
Constant
Source
site/fabricate/api.clj

plan!

site.fabricate.api/plan!

Execute all the given `setup-tasks`, then `collect` the list of entries from each source. This list of entries will be appended to any entries passed in as a component of the `site` argument.

Type
Function
Arguments
[setup-tasks
{:keys [site.fabricate.api/entries
site.fabricate.api/options]

:or {entries []}
:as site}
]
Source
site/fabricate/api.clj

produce!

site.fabricate.api/produce!

Produce the content of a file from the results of the `build` operation and write it to disk. Takes an entry and returns an entry.

Type
Multimethod
Source
site/fabricate/api.clj

produce-dispatch

site.fabricate.api/produce-dispatch

Return the document and page format for an entry.

Type
Function
Arguments
[entry options]
Source
site/fabricate/api.clj

registry

site.fabricate.api/registry

Registry for the Malli schemas defining aspects of Fabricate's API.

Type
Constant
Source
site/fabricate/api.clj

site-fn-schema

site.fabricate.api/site-fn-schema

Function schema for functions that operate on a site

Type
Constant
Source
site/fabricate/api.clj

site-schema

site.fabricate.api/site-schema

Malli schema describing the contents of a Fabricate site. A site is the primary map passed between the 3 core API functions: plan!, assemble, and construct!

Type
Constant
Source
site/fabricate/api.clj

site.fabricate.prototype.schema

Utility namespace for working with malli schemas, including a default registry and predicates used across Fabricate's implementation.

file?

site.fabricate.prototype.schema/file?

Returns true if the given value is a type that represents a file.

Type
Function
Arguments
[v]
Source
site/fabricate/prototype/schema.clj

has-reqd?

site.fabricate.prototype.schema/has-reqd?

Checks to see if at least one entry in the given map schema has required keys

Type
Function
Arguments
[schema]
Source
site/fabricate/prototype/schema.clj

malli?

site.fabricate.prototype.schema/malli?

Returns true if the given form is a valid malli schema.

Type
Function
Arguments
[form]
Source
site/fabricate/prototype/schema.clj

ns-form?

site.fabricate.prototype.schema/ns-form?

Returns true if the given form is a valid Clojure (ns ...) special form.

Type
Function
Arguments
[form]
Source
site/fabricate/prototype/schema.clj

ns?

site.fabricate.prototype.schema/ns?

Returns true if the given value is a Namespace or is a symbol that names a namespace.

Type
Function
Arguments
[v]
Source
site/fabricate/prototype/schema.clj

regex

site.fabricate.prototype.schema/regex

Malli schema for regular expressions.

Type
Constant
Source
site/fabricate/prototype/schema.clj

register!

site.fabricate.prototype.schema/register!

Add the `schema` specified by the `type` keyword to the global registry. Similar to `clojure.spec.alpha/def`.

Type
Function
Arguments
[type schema]
Source
site/fabricate/prototype/schema.clj

registry

site.fabricate.prototype.schema/registry

Global registry for Fabricate's Malli schemas.

Type
Constant
Source
site/fabricate/prototype/schema.clj

subschema

site.fabricate.prototype.schema/subschema

Uses the registry of the provided schema to create a schema for one of the reference schemas in that registry.

Type
Function
Arguments
[schema new-ref]
Source
site/fabricate/prototype/schema.clj

throwable-map-schema

site.fabricate.prototype.schema/throwable-map-schema

Malli schema for the results of Throwable->map

Type
Constant
Source
site/fabricate/prototype/schema.clj

throwable-map?

site.fabricate.prototype.schema/throwable-map?

Returns true if the given map matches the type returned by Throwable->map.

Type
Function
Source
site/fabricate/prototype/schema.clj

unify

site.fabricate.prototype.schema/unify

A lighter-weight version of malli's own unify/merge that's more compatible with number-based indexing/item access.

Type
Function
Arguments
[schemas]
Source
site/fabricate/prototype/schema.clj

site.fabricate.prototype.read

Parsing + evaluation utilities for embedded Clojure forms. The functions in this namespace split the text into a sequence of Hiccup forms and embedded expressions, which is then traversed again to evaluate it, embedding (or not) the results of those expressions within the Hiccup document.

error->hiccup

site.fabricate.prototype.read/error->hiccup

Return a Hiccup form with context for the error.

Type
Function
Arguments
[{:keys [expr-src exec expr error result display]
:as parsed-expr}
]
Source
site/fabricate/prototype/read.clj

error-form-schema

site.fabricate.prototype.read/error-form-schema

Malli schema describing Hiccup forms that contain error messages

Type
Constant
Source
site/fabricate/prototype/read.clj

eval-all

site.fabricate.prototype.read/eval-all

Walks the parsed template and evaluates all the embedded expressions within it. Returns a Hiccup form.

Type
Function
Arguments
([parsed-form simplify? nmspc]
[parsed-form simplify?]
[parsed-form])
Source
site/fabricate/prototype/read.clj

eval-parsed-expr

site.fabricate.prototype.read/eval-parsed-expr

Evaluates the given expression form. Returns the value of the evaluated expression by default. Can optionally return a map with the value and also perform post-validation on the resulting value.

Type
Function
Arguments
([{:keys [expr-src expr exec error result display
fabricate.read/parse-error]

:as expr-map}
simplify? post-validator]

[expr simplify?]
[expr])
Source
site/fabricate/prototype/read.clj

evaluated-expr-schema

site.fabricate.prototype.read/evaluated-expr-schema

Schema describing a map containing the results of an evaluated Fabricate expression.

Type
Constant
Source
site/fabricate/prototype/read.clj

extended-form->form

site.fabricate.prototype.read/extended-form->form

Converts the parsed grammar describing an extended form to a Hiccup form.

Type
Function
Arguments
[[tag open front-matter [_ & forms] close :as ext-form]]
Source
site/fabricate/prototype/read.clj

fabricate-expr?

site.fabricate.prototype.read/fabricate-expr?

Returns true if the given value matches the schema for parsed Fabricate expressions.

Type
Function
Source
site/fabricate/prototype/read.clj

file-metadata-schema

site.fabricate.prototype.read/file-metadata-schema

Schema describing a map of file metadata used by fabricate

Type
Constant
Source
site/fabricate/prototype/read.clj

form->hiccup

site.fabricate.prototype.read/form->hiccup

If the form has no errors, return its results. Otherwise, create a hiccup form describing the error.

Type
Function
Arguments
[{:keys [expr-src exec expr error result display]
:as parsed-expr}
]
Source
site/fabricate/prototype/read.clj

get-file-metadata

site.fabricate.prototype.read/get-file-metadata

Get the metadata of the file used by Fabricate.

Type
Function
Arguments
[file-path]
Source
site/fabricate/prototype/read.clj

get-metadata

site.fabricate.prototype.read/get-metadata

Get the metadata form from the parse tree.

Type
Function
Arguments
[expr-tree]
Source
site/fabricate/prototype/read.clj

metadata-schema

site.fabricate.prototype.read/metadata-schema

Malli schema for unevaluated metadata form/map

Type
Constant
Source
site/fabricate/prototype/read.clj

parse

site.fabricate.prototype.read/parse

Parses the template into a Hiccup expression with unevaluated forms.

Type
Function
Arguments
([src
{:keys [start-seq filename]
:or {start-seq [] filename ""}}
]

[src])
Source
site/fabricate/prototype/read.clj

parsed-expr-schema

site.fabricate.prototype.read/parsed-expr-schema

Schema describing the map used by Fabricate to evaluate forms embedded within page templates.

Type
Constant
Source
site/fabricate/prototype/read.clj

parsed-form->expr-map

site.fabricate.prototype.read/parsed-form->expr-map

Transforms the results of a parsed Fabricate expression into the map used for evaluation.

Type
Function
Arguments
[parsed-form]
Source
site/fabricate/prototype/read.clj

parsed-schema

site.fabricate.prototype.read/parsed-schema

Malli schema describing the elements of a fabricate template after it has been parsed by the Instaparse grammar.

Type
Constant
Source
site/fabricate/prototype/read.clj

read-error?

site.fabricate.prototype.read/read-error?

Returns true if the given expression failed to read into a valid Clojure form.

Type
Function
Arguments
[error-form]
Source
site/fabricate/prototype/read.clj

read-template

site.fabricate.prototype.read/read-template

Parses the given template and adds line and column metadata to the forms.

Type
Function
Arguments
[template-txt]
Source
site/fabricate/prototype/read.clj

yank-ns

site.fabricate.prototype.read/yank-ns

Pulls the namespace form out of the first expression in the parse tree.

Type
Function
Arguments
[expr-tree]
Source
site/fabricate/prototype/read.clj

site.fabricate.prototype.document.fabricate

Generate documents from Fabricate source templates

entry->hiccup-article

site.fabricate.prototype.document.fabricate/entry->hiccup-article

Return a Hiccup article for the document by parsing and evaluating the document's Fabricate template.

Type
Function
Arguments
[entry opts]
Source
site/fabricate/prototype/document/fabricate.clj

site.fabricate.document

Default methods for building documents from sources

defaults

site.fabricate.document/defaults

Default options for documents

Type
Constant
Source
site/fabricate/document.clj

site.fabricate.api

Fabricate's public API. This contains the core set of operations that Fabricate uses to produce a website from input files.

assemble

site.fabricate.api/assemble

Prepare the entries for `produce!` by calling `build` on each entry, then running `tasks` on the results.

Type
Function
Arguments
[tasks
{:keys [site.fabricate.api/entries
site.fabricate.api/options]

:as site}
]
Source
site/fabricate/api.clj

build

site.fabricate.api/build

Generate structured (EDN) document content for an entry from a source format. Takes an entry and returns a document (entry).

Type
Multimethod
Source
site/fabricate/api.clj

build-dispatch

site.fabricate.api/build-dispatch

Return the source and document formats for an entry.

Type
Function
Arguments
[entry options]
Source
site/fabricate/api.clj

collect

site.fabricate.api/collect

Generate the input entries from a source.

Type
Multimethod
Source
site/fabricate/api.clj

construct!

site.fabricate.api/construct!

Run the tasks necessary to complete the website. Execute `produce` on every page, then run `tasks`.

Type
Function
Arguments
[tasks
{:keys [site.fabricate.api/entries
site.fabricate.api/options]

:as init-site}
]
Source
site/fabricate/api.clj

entry-schema

site.fabricate.api/entry-schema

Malli schema describing entries.

Type
Constant
Source
site/fabricate/api.clj

glossary

site.fabricate.api/glossary

Key terms used by Fabricate.

Type
Constant
Source
site/fabricate/api.clj

plan!

site.fabricate.api/plan!

Execute all the given `setup-tasks`, then `collect` the list of entries from each source. This list of entries will be appended to any entries passed in as a component of the `site` argument.

Type
Function
Arguments
[setup-tasks
{:keys [site.fabricate.api/entries
site.fabricate.api/options]

:or {entries []}
:as site}
]
Source
site/fabricate/api.clj

produce!

site.fabricate.api/produce!

Produce the content of a file from the results of the `build` operation and write it to disk. Takes an entry and returns an entry.

Type
Multimethod
Source
site/fabricate/api.clj

produce-dispatch

site.fabricate.api/produce-dispatch

Return the document and page format for an entry.

Type
Function
Arguments
[entry options]
Source
site/fabricate/api.clj

registry

site.fabricate.api/registry

Registry for the Malli schemas defining aspects of Fabricate's API.

Type
Constant
Source
site/fabricate/api.clj

site-fn-schema

site.fabricate.api/site-fn-schema

Function schema for functions that operate on a site

Type
Constant
Source
site/fabricate/api.clj

site-schema

site.fabricate.api/site-schema

Malli schema describing the contents of a Fabricate site. A site is the primary map passed between the 3 core API functions: plan!, assemble, and construct!

Type
Constant
Source
site/fabricate/api.clj

site.fabricate.prototype.document.clojure

Prototype namespace for generating Hiccup and Kindly values from Clojure forms.

eval-form

site.fabricate.prototype.document.clojure/eval-form

Evaluate the Clojure form contained in the given map.

Type
Function
Arguments
[{clojure-form :clojure/form
clj-ns :clojure/namespace
clj-str :clojure/source
:or {clj-ns (ns-name *ns*)}
:as unevaluated-form}
]
Source
site/fabricate/prototype/document/clojure.clj

eval-forms

site.fabricate.prototype.document.clojure/eval-forms

Evaluate the Clojure forms in a parsed file.

Type
Function
Arguments
[{:keys [clojure/forms] :as input}]
Source
site/fabricate/prototype/document/clojure.clj

form->kind

site.fabricate.prototype.document.clojure/form->kind

Produce a kindly value from the given form. By default, produces a plaintext string from a Clojure comment form and marks it as a Clojure comment with metadata. Will wrap values not supporting metadata in vectors.

Type
Function
Arguments
([{:keys [clojure/result clojure/metadata clojure/form
clojure/source]

clj-comment :clojure/comment
clj-error :clojure/error
:as evaluated-form}

{:keys [hide-nils hide-vars]
:or {hide-nils true hide-vars true}
:as opts}
]

[form])
Source
site/fabricate/prototype/document/clojure.clj

form-schema

site.fabricate.prototype.document.clojure/form-schema

Map schema describing a simplified way of storing Clojure forms and their potential results.

Type
Constant
Source
site/fabricate/prototype/document/clojure.clj

forms->fragment

site.fabricate.prototype.document.clojure/forms->fragment

Produce a kindly fragment from the given forms. Consecutive comment forms get combined into a single plaintext string. Whitespace-only forms get skipped. See https://scicloj.github.io/kindly-noted/kinds.html#fragment for documentation about the fragment kind.

Type
Function
Arguments
[{:keys [clojure/forms]
page-ns :clojure/namespace
:as page-map}
]
Source
site/fabricate/prototype/document/clojure.clj

forms->hiccup

site.fabricate.prototype.document.clojure/forms->hiccup

Produce a Hiccup article vector from the given forms after evaluation.

Type
Function
Arguments
[{:keys [clojure/forms]
page-ns :clojure/namespace
:as page-map}
]
Source
site/fabricate/prototype/document/clojure.clj

node->form

site.fabricate.prototype.document.clojure/node->form

Convert the given rewrite-clj node into a form map.

Type
Function
Arguments
([n m] [n])
Source
site/fabricate/prototype/document/clojure.clj

normalize-node

site.fabricate.prototype.document.clojure/normalize-node

Return a node representing the normalized 'value' for the given node.

Type
Function
Arguments
[n]
Source
site/fabricate/prototype/document/clojure.clj

read-forms

site.fabricate.prototype.document.clojure/read-forms

Return a vector of Clojure form maps from the input file or string. If passed a file or string path pointing to an existing file, will read from the file, otherwise treats the input as a string containing Clojure source.

Type
Function
Arguments
[clj-src]
Source
site/fabricate/prototype/document/clojure.clj

site.fabricate.page

Default methods for producing pages from documents

    site.fabricate.prototype.page.html

    Default API methods for converting Hiccup documents into HTML pages.

    css-reset

    site.fabricate.prototype.page.html/css-reset

    CSS reset for Fabricate pages

    Type
    Constant
    Source
    site/fabricate/prototype/page/html.clj

    default-metadata

    site.fabricate.prototype.page.html/default-metadata

    Default metadata to add to page head elements

    Type
    Constant
    Source
    site/fabricate/prototype/page/html.clj

    entry->hiccup-body

    site.fabricate.prototype.page.html/entry->hiccup-body

    Generate a HTML <body> Hiccup element from the entry.

    Type
    Function
    Arguments
    ([{hiccup-data :site.fabricate.document/data :as entry}
    opts]

    [entry])
    Source
    site/fabricate/prototype/page/html.clj

    entry->hiccup-head

    site.fabricate.prototype.page.html/entry->hiccup-head

    Generate a HTML <head> Hiccup element from the entry.

    Type
    Function
    Arguments
    ([{doc-title :site.fabricate.document/title :as entry} opts]
    [entry])
    Source
    site/fabricate/prototype/page/html.clj

    hiccup-entry->html-entry

    site.fabricate.prototype.page.html/hiccup-entry->html-entry

    Generate an entry with a HTML5 string from the given Hiccup entry. Pass a function as the `:entry->head` key in the options map to generate a header from the contents of the entry. Pass a function as the `:entry->body` key to generate the body from the entry (including the data)

    Type
    Function
    Arguments
    [{hiccup-data :site.fabricate.document/data :as entry}
    {:keys [entry->body entry->head]
    :or {entry->head entry->hiccup-head
    entry->body entry->hiccup-body}

    :as opts}
    ]
    Source
    site/fabricate/prototype/page/html.clj

    site.fabricate.prototype.source.clojure

    Namespace for generating entry maps from Clojure sources

      site.fabricate.prototype.html

      Namespace for creating HTML forms using Hiccup data structures and for verifying their structural correctness using malli schemas. The schemas in this namespace implement a non-interactive subset of the MDN HTML spec.

      atomic-element

      site.fabricate.prototype.html/atomic-element

      Malli schema representing atomic HTML/Hiccup elements

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      atomic-element?

      site.fabricate.prototype.html/atomic-element?

      Returns true if the given value is an atomic HTML/Hiccup element

      Type
      Function
      Source
      site/fabricate/prototype/html.clj

      block-level-tags

      site.fabricate.prototype.html/block-level-tags

      MDN list of block-level HTML element tags

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      element

      site.fabricate.prototype.html/element

      Malli schema for HTML elements.

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      element-explainers

      site.fabricate.prototype.html/element-explainers

      Map with tags (keys) and functions (values) that explain why a value does not match the schema for the HTML element of the given type.

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      element-flat

      site.fabricate.prototype.html/element-flat

      Simplified schema for HTML elements that does not distinguish between flow, phrasing, heading, or metadata content.

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      element-flat-explainer

      site.fabricate.prototype.html/element-flat-explainer

      Explain why the given value does not match the schema for flat HTML content.

      Type
      Function
      Source
      site/fabricate/prototype/html.clj

      element-parsers

      site.fabricate.prototype.html/element-parsers

      Map with tags (keys) and functions (values) that parse a HTML element of the specific type.

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      element-validators

      site.fabricate.prototype.html/element-validators

      Map with tags (keys) and predicates (values) that check if a value is a HTML element of the given type.

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      element?

      site.fabricate.prototype.html/element?

      Returns true if the given value is a HTML element.

      Type
      Function
      Source
      site/fabricate/prototype/html.clj

      embedded-tags

      site.fabricate.prototype.html/embedded-tags

      MDN list of embedded content element tags

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      explain-element

      site.fabricate.prototype.html/explain-element

      Explain why the given value is not a HTML element.

      Type
      Function
      Source
      site/fabricate/prototype/html.clj

      flow-tags

      site.fabricate.prototype.html/flow-tags

      MDN list of flow content element tags

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      flow?

      site.fabricate.prototype.html/flow?

      Returns true if the element is HTML flow content.

      Type
      Function
      Source
      site/fabricate/prototype/html.clj

      global-attributes

      site.fabricate.prototype.html/global-attributes

      MDN list of global HTML attributes as malli schema

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      heading-tags

      site.fabricate.prototype.html/heading-tags

      MDN list of heading content element tags

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      heading?

      site.fabricate.prototype.html/heading?

      Returns true if the element is HTML heading content.

      Type
      Function
      Source
      site/fabricate/prototype/html.clj

      html

      site.fabricate.prototype.html/html

      Malli schema for a subset of HTML. Will fail to validate on elements that do not respect the hierarchy of flow and phrasing content.

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      inline-tags

      site.fabricate.prototype.html/inline-tags

      MDN list of inline HTML element tags

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      interactive-tags

      site.fabricate.prototype.html/interactive-tags

      MDN list of interactive content element tags

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      metadata-tags

      site.fabricate.prototype.html/metadata-tags

      MDN list of metadata content element tags

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      ns-kw

      site.fabricate.prototype.html/ns-kw

      Convert the given keyword to a namespaced version, using the current ns if not provided.

      Type
      Function
      Arguments
      ([ns kw] [kw])
      Source
      site/fabricate/prototype/html.clj

      palpable?

      site.fabricate.prototype.html/palpable?

      Returns true if the node is visible.

      Type
      Function
      Arguments
      [c]
      Source
      site/fabricate/prototype/html.clj

      parse-element

      site.fabricate.prototype.html/parse-element

      Parse the given value as a HTML element.

      Type
      Function
      Source
      site/fabricate/prototype/html.clj

      parse-element-flat

      site.fabricate.prototype.html/parse-element-flat

      Parse the given value according to the schema for flat HTML content.

      Type
      Function
      Source
      site/fabricate/prototype/html.clj

      permitted-contents

      site.fabricate.prototype.html/permitted-contents

      Gets the permitted contents of the given tag

      Type
      Function
      Arguments
      [tag]
      Source
      site/fabricate/prototype/html.clj

      phrasing-subtags

      site.fabricate.prototype.html/phrasing-subtags

      MDN list of tags that are phrasing content when they contain only phrasing content.

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      phrasing-tags

      site.fabricate.prototype.html/phrasing-tags

      MDN list of phrasing content element tags

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      phrasing?

      site.fabricate.prototype.html/phrasing?

      Returns true if the element is HTML phrasing content.

      Type
      Function
      Source
      site/fabricate/prototype/html.clj

      sectioning-tags

      site.fabricate.prototype.html/sectioning-tags

      MDN list of sectioning content element tags

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      tag-contents

      site.fabricate.prototype.html/tag-contents

      Map with permitted contents across all tags.

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      transparent-tags

      site.fabricate.prototype.html/transparent-tags

      MDN list of transparent content tags

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      url

      site.fabricate.prototype.html/url

      Malli schema for URLs.

      Type
      Constant
      Source
      site/fabricate/prototype/html.clj

      validate-element

      site.fabricate.prototype.html/validate-element

      Attempt to validate the element based on its tag, or the keyword in the first position of the vector.

      Type
      Function
      Arguments
      [elem]
      Source
      site/fabricate/prototype/html.clj

      site.fabricate.prototype.read.grammar

      Instaparse grammar for Fabricate's page templates.

      delimiters

      site.fabricate.prototype.read.grammar/delimiters

      Default delimiters for Fabricate.

      Type
      Constant
      Source
      site/fabricate/prototype/read/grammar.clj

      grammar

      site.fabricate.prototype.read.grammar/grammar

      The formal grammar for Fabricate templates.

      Type
      Constant
      Source
      site/fabricate/prototype/read/grammar.clj

      template

      site.fabricate.prototype.read.grammar/template

      An Instaparse parser for Fabricate templates.

      Type
      Constant
      Source
      site/fabricate/prototype/read/grammar.clj

      site.fabricate.prototype.source.fabricate

      Functions for Fabricate source files

      defaults

      site.fabricate.prototype.source.fabricate/defaults

      Default options for Fabricate sources.

      Type
      Constant
      Source
      site/fabricate/prototype/source/fabricate.clj

      site.fabricate.source

      Default sources for Fabricate

      defaults

      site.fabricate.source/defaults

      Default options for sources.

      Type
      Constant
      Source
      site/fabricate/source.clj

      file-times

      site.fabricate.source/file-times

      Return a map with two ZonedDateTimes representing when the file was created and modified.

      Type
      Function
      Arguments
      [f]
      Source
      site/fabricate/source.clj

      site.fabricate.prototype.hiccup

      Functions for transforming Hiccup elements after processing.

      ->meta

      site.fabricate.prototype.hiccup/->meta

      Convert the given key/value pair to a Hiccup/HTML metadata element.

      Type
      Function
      Arguments
      [[k v]]
      Source
      site/fabricate/prototype/hiccup.clj

      default-metadata

      site.fabricate.prototype.hiccup/default-metadata

      Additional default metadata for Fabricate HTML pages.

      Type
      Constant
      Source
      site/fabricate/prototype/hiccup.clj

      default-metadata-map

      site.fabricate.prototype.hiccup/default-metadata-map

      Default metadata for Fabricate HTML pages.

      Type
      Constant
      Source
      site/fabricate/prototype/hiccup.clj

      doc-header

      site.fabricate.prototype.hiccup/doc-header

      Returns a default header from a map with a post's metadata.

      Type
      Function
      Arguments
      [{:keys [title page-style scripts] :as metadata}]
      Source
      site/fabricate/prototype/hiccup.clj

      lift-metadata

      site.fabricate.prototype.hiccup/lift-metadata

      Lifts the metadata out of the page contents and into the given metadata map.

      Type
      Function
      Arguments
      [page-contents metadata]
      Source
      site/fabricate/prototype/hiccup.clj

      opengraph-enhance

      site.fabricate.prototype.hiccup/opengraph-enhance

      Enriches the metadata items given by mapping from metadata names to opengraph properties. See https://stackoverflow.com/a/22984013 for more context on combining these attributes in a single HTML <meta> element.

      Type
      Function
      Arguments
      [prop-names items]
      Source
      site/fabricate/prototype/hiccup.clj

      opengraph-properties

      site.fabricate.prototype.hiccup/opengraph-properties

      Mapping of strings and keywords to corresponding opengraph properties. See https://ogp.me/ for more details.

      Type
      Constant
      Source
      site/fabricate/prototype/hiccup.clj

      parse-paragraphs

      site.fabricate.prototype.hiccup/parse-paragraphs

      Detects the paragraphs within the form based on a delimiter and separates them into distinct <p> elements.

      Type
      Function
      Arguments
      ([form
      {:keys [paragraph-pattern default-form current-paragraph?]
      :or {paragraph-pattern #"\n\n"
      default-form [:p]
      current-paragraph? false}

      :as opts}
      ]

      [form])
      Source
      site/fabricate/prototype/hiccup.clj