テーマ設定のHTMLを削除せずに表示する

こんにちは皆さん、

テーマでテーマ設定を出力しようとしていますが、この設定にはHTMLが含まれています。しかし、以下のコードは機能しません。

{{html-safe (theme-setting "my_text")}}

何が間違っているのでしょうか?

よろしくお願いします。

「いいね!」 1

こんにちは :wave:
動作するテーマコンポーネントを作成しました。

settings.yml の抜粋:

content_before:
  default: "<strong>寄付進捗バー</strong>"
  type: string
content_after:
  default: "<em>寄付目標が達成されると、進捗バーは非表示になります。</em>"
  type: string

head_tag.html の抜粋:

<div class="progress-bar-before">{{html-safe (theme-setting "content_before")}}</div>
    <div class="progress-bar-data">
        <div class="progress-bar-container">
            <div class="progress-bar"></div>
        </div>
        <div class="progress-status"></div>
    </div>
<div class="progress-bar-before">{{html-safe (theme-setting "content_after")}}</div>

結果:

image

これで何か手がかりが見つかるかもしれませんか?

それとも、テーマコンポーネントのコードをもう少し共有していただけますか?

「いいね!」 2

どうもありがとうございます!何が間違っているのか解明しようと思います!

「いいね!」 1