<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sonata30</author_name>
  <author_url>https://blog.hatena.ne.jp/sonata30/</author_url>
  <blog_title>my_back_pages</blog_title>
  <blog_url>https://shodan.hatenablog.jp/</blog_url>
  <categories>
    <anon>Rails</anon>
  </categories>
  <description>小さなことですがハマったのでシェアです。 やりたいこと 以下のようなHTMLを、Slimを使ってレンダリングすること。 scriptタグで記載される要素 要素のコンテンツは、Slim内で2行以上で書かれるJavaScriptコード type属性に値を指定する つまり、レンダリングしたいHTMLは以下のような感じです。 &lt;script type=&quot;module&quot;&gt;import Swiper from 'https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.mjs' const swiper = new Swiper('.swiper',…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshodan.hatenablog.jp%2Fentry%2F2024%2F08%2F05%2F142959&quot; title=&quot;【Slim】レンダリングされるscriptタグに属性を付与しつつ、2行以上のJavaScriptを書く方法【Rails】 - my_back_pages&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-08-05 14:29:59</published>
  <title>【Slim】レンダリングされるscriptタグに属性を付与しつつ、2行以上のJavaScriptを書く方法【Rails】</title>
  <type>rich</type>
  <url>https://shodan.hatenablog.jp/entry/2024/08/05/142959</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
