FleekSiteFLEEKSITE
On this section
Developers

Build on FleekSite.

Every FleekSite site is a set of templates rendered with Liquid. This is the reference for the people who write those templates: the tags and filters, the objects your template can read, how a request becomes a page, and the API around it.

FleekSite templates are written in Liquid, the same template language you may know from other platforms, run through LiquidJS with a layer of FleekSite tags, filters and objects on top. If you have written a theme before, most of what you know carries over. What is specific to FleekSite, this documentation covers in full.

You do not install anything to build here. A template is a record on your site, edited in the admin and rendered live. Save it and the change is on the page within about a minute.

A first look

Here is a template fragment that lists the three most recent blog posts. It uses one FleekSite tag, {% collection %}, to read from the database, standard Liquid to loop, and a mix of standard and FleekSite filters to format the output.

{% comment %} The three most recent published posts {% endcomment %}
{% collection blogs, posts, limit: 3, order: published_at desc %}

 class="post-list">
  {% for post in posts %}
    >
       href="{{ post.permalink }}">{{ post.title }}>
      >{{ post.published_at | custom_date: 'dd MMM yyyy' }}>
      >{{ post.teaser | strip_tags | truncatewords: 24 }}>
    >
  {% endfor %}
>

Three things are worth naming from that one example, because they run through everything else:

  • {% collection blogs, posts %} queries your site's own data. blogs is the source, posts is the variable the results land in. The tag resolves blogs to the post table filtered to the blog type, so posts is a normal array you can loop.
  • {{ post.permalink }}, {{ post.title }} and the rest come from the objects FleekSite puts in the render context. A post carries its author, media, tags and a cleaned permalink, ready to use.
  • strip_tags and custom_date are FleekSite filters; truncatewords is standard Liquid. The filter reference marks which is which, and where the behaviour differs by render mode.

How a page becomes HTML

When a visitor requests a URL on your site, FleekSite runs a fixed pipeline. Knowing the shape of it explains where your template sits and why things resolve the way they do.

  1. Resolve the site from the request host, and read its render mode.
  2. Find the template for the path. An exact permalink match wins; otherwise a post is rendered through the layout template for its type.
  3. Build the context: site, page, env, bits and the rest, from the database and the request.
  4. Render the Liquid tolerantly: an undefined variable is empty, and a single broken tag never takes the whole page down.
  5. Inject meta and SEO into the head, then serve, with a short-lived cache in front.

The render pipeline page walks each step with the resolution order, the meta it injects and how caching and purging behave.

The building blocks

The documentation is grouped the way the platform is built. Start anywhere; each area stands on its own.

Two render modes

Every site renders in one of two modes, and it changes a handful of behaviours you will meet throughout these docs.

  • Standard is standard, Shopify-compliant Liquid. New sites use it by default. Unknown tags surface as errors you can see, truncate behaves the way every Liquid reference says, and native {% include %} and {% render %} compose your own templates.
  • Compat reproduces the older engine byte for byte, for sites built before the change. A few filters and behaviours differ, and unknown tags are silently dropped.

Throughout the reference, a behaviour that differs is tagged Standard or Compat. When neither tag appears, the behaviour is the same in both. A feature still on the way is tagged Coming.

Where to start

New to the platform, read the concepts in order. Here for one specific tag or filter, jump straight to the reference from the menu.