I don't get why this does not work

Hello

I got vey confused with zola variables and tera. I must be missing something obvious. I just tried

{{ page.content  | replace(from=page.summary, to="") }}

and am told it fails because page.summary is not a string

Error: Reason: Filter `replace` received an incorrect type for arg `from`: got `null` but expected a String

if I try

{% set x= "delete me" %}
{{ page.content  | replace(from=x, to="") }}

it works.
I don’t get why tera thinks page.summary is null, when I have no problem displaying it with

{{ page.summary }}

so if I could convert page.summary into a string it would solve showing content with summary, I saw a post on why it is not possible to do that, but

all the best, j

Solved it, needed page.summary for og:description and so found the solution deep in the tera manual. Coerce page.summary to a string with
{% set summary = page.summary| as_str %}
then can also do
{% set page=page.content | replace(from=summary,to="") %}

I’d love to know the type of page.summary. maybe time to read the rust source code.

It might be useful to put this into the manual.