From c570b29f9a7bd83368e6d798976a83ac5a895169 Mon Sep 17 00:00:00 2001
From: Spencer Brower <6729162+sbrow@users.noreply.github.com>
Date: Mon, 7 Sep 2026 11:30:41 -0400
Subject: [PATCH] fix: Fixed issue with rel_url not accepting JSON strings.
---
defaults/layouts/partials/styles.html | 2 ++
mustache/pipes.odin | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/defaults/layouts/partials/styles.html b/defaults/layouts/partials/styles.html
index 90c1d36..78c4e7b 100644
--- a/defaults/layouts/partials/styles.html
+++ b/defaults/layouts/partials/styles.html
@@ -1,3 +1,4 @@
+{{^params.stylesheets}}
+{{/params.stylesheets}}
{{#params.stylesheets}}{{/params.stylesheets}}
diff --git a/mustache/pipes.odin b/mustache/pipes.odin
index e357af7..0821eac 100644
--- a/mustache/pipes.odin
+++ b/mustache/pipes.odin
@@ -347,7 +347,8 @@ apply_filter :: proc(
span := filter.end_pos - filter.op_pos
return take(value, filter.args[:], false, tmpl, filter.op_pos, span)
case .Rel_Url:
- str, ok := reflect.as_string(value)
+ bv, _ := base_value(value)
+ str, ok := reflect.as_string(bv)
if !ok {
return value, Error_Body {
msg = "rel_url may only be used on strings",
@@ -617,3 +618,4 @@ take :: proc(
return any{new_clone(str[start:end], context.temp_allocator), typeid_of(string)}, warning
}
}
+