HaXtatic Docs

X-renderers

Any X-tag declared and defined in a project always invokes a so-called "X-renderer":

  • a specific, specialized programmatic output-rendering routine integrated into the HaXtatic code-base,
  • each offering its own degree of configurability (the once-per-tag-definition settings) and parameterization (the varying-dynamically-per-tag-invocation settings).

HaXtatic ships with numerous such simple-yet-versatile X-renderers that are listed below, and custom ones may be coded up and integrated straightforwardly in Haskell (if minimally comfortable with the language and its tool-chain) — starting from the 2 demo starter samples.

All the following built-in X-renderers are ready to use in X-tag definitions:

Topics

  • hax.miniTag
    Outputs  <somehtmltag ..>tag's inner-markup content</somehtmltag>.
  • hax.xmlEscape
    Outputs the given content with all occurrences of any of & < > " ' each appropriately entity-escaped for safe inclusion in HTML/XML/etc. markup.
  • hax.htmlLink
    Outputs <a ..>..</a>.
  • hax.htmlImage
    Outputs <img .. /> or <a ..><img .. /></a>.
  • hax.htmlLinks
    Helps with site navigation: outputs a sequence of <a href=".."> .. </a> or  <outerhtmltag ..><a href=".."> .. </a></outerhtmltag> in a uniform manner.
  • hax.htmlAnchors
    Helps with page-level tables-of-content: outputs a sequence of  <a href="#.."> .. </a> or  <outerhtmltag ..><a href="#.."> .. </a></outerhtmltag> — one per  <gatherhtmltag> element found in the content source file.
  • hax.dtFormat
    Outputs in a designated output format any input date/time text-values encoded in a designated input format.
  • hax.unMarkup
    Outputs the given content with HTML/XML/etc. markup tags (but not entities outside such tags) naively replaced by space characters.
  • hax.noOp
    Outputs either the given content exactly-as-specified, or ignores it and outputs the pre-configured "constant" content.
  • hax.snippet
    Renders the named "snippet" (aka. "controls" / "components" / "sub-templates") substituting the specified named-parameter values.
  • hax.iterator
    Outputs a sequence of values from the specified enumerator, applying the specified filtering/ordering/limits.
  • hax.feedView
    Renders posts from the specified feeds grouped as specified, delegating display logic to the specified X-tags.
  • demoSimplest
    Outputs <h1>Hello World!</h1>.
  • demoCfgArgs
    Outputs <h4>Hello, <b>greetname!</b></h4>.
  
…Scroll to: