Templating Engine
Make your Readits intelligent and dynamic using the built-in templating engine.
Readit processes all content through the Liquid templating engine before serving it. This means you can use variables and logic in any file, at any time, to generate dynamic Markdown.
This allows you to insert the current timestamp, dynamically list all files in a Readit, show conditional content based on sharing status, variables, transformation and much more.
We use Liquid syntax, see here for all details shopify/liquid
Complete Template Variable Reference
Section titled “Complete Template Variable Reference”The following variables are available for each readit rendering
Time Variables
Section titled “Time Variables”-
{{ now }}: Current ISO timestamp (e.g., “2025-09-17T18:30:00.000Z”).you can get different format using Date filter (see below)
Readit Variables
Section titled “Readit Variables”-
{{ readit.name }}: The name of the Readit. -
{{ readit.description }}: The Readit’s description (can be null). -
{{ readit.slug }}: The URL slug for the Readit. -
{{ readit.visibility }}: Visibility level (“public”, “private”, “unlisted”). -
{{ readit.mainfile }}: The name of the root file (can be null). -
{{ readit.files }}: An array of all file objects in the Readit.- Each file object contains:
id,name,fileType,sizeBytes,tokenCount,summary,createdAt,updatedAt.
- Each file object contains:
Current File Variables
Section titled “Current File Variables”-
{{ file.name }}: The name of the file currently being viewed. -
{{ file.token_count }}: Token count of the current file. -
{{ file.size_bytes }}: Size in bytes of the current file.
Sharing Variables
Section titled “Sharing Variables”-
{{ url_token }}: The sharing token for the current URL. -
{{ expired }}: A boolean (true/false) indicating if the link has expired. -
{{ expires_in }}: The number of seconds remaining before expiration (null if no expiration).
Search Variables
Section titled “Search Variables”These are only available when the ?q= parameter is in the URL.
-
{{ search.results }}: An array of result objects. -
{{ search.total }}: Total number of results found. -
{{ search.query }}: The search query string used. -
{{ search.limit }}: The results-per-page limit. -
{{ search.offset }}: The pagination offset.- Each result object contains:
id,filename,file_type,created_at,updated_at,rank,snippet.
- Each result object contains:
Control flow and iteration
Section titled “Control flow and iteration”you can use several control flow constructs and iterators:
if/elseif/else, case/when, unless, for loop, cycle, tablerow…
{% if product.title == "Awesome Shoes" %} These shoes are awesome!{% endif %}{% for product in collection.products %} {{ product.title }}{% endfor %}Filters
Section titled “Filters”These are the main filters that can be useful in a readit.
prepend
Section titled “prepend”{{ "/my/fancy/url" | append: ".html" }} --> /my/fancy/url.htmlcapitalize
Section titled “capitalize”{{ "title" | capitalize }} --> Test{{ now | date: "%a, %b %d, %y" }} --> Fri, Sep 19, 25default
Section titled “default”{{ product_price | default: 2.99 }}{{ "Ground control to Major Tom." | size }}truncate
Section titled “truncate”{{ "Ground control to Major Tom." | truncate: 20 }} --> Ground control to...url encode
Section titled “url encode”{{ "Tetsuro Takara" | url_encode }} --> Tetsuro+TakaraUnique
Section titled “Unique”{% assign my_array = "ants, bugs, bees, bugs, ants" | split: ", " %}
{{ my_array | uniq | join: ", " }} --> ants, bugs, bees{{ "Ground control to Major Tom." | split: " " | first }}{% assign beatles = "John, Paul, George, Ringo" | split: ", " %}
{{ beatles | join: " and " }} --> John and Paul and George and RingoFor all filters, you can see here shopify/liquid