{"id":68990,"date":"2023-07-19T12:06:42","date_gmt":"2023-07-19T04:06:42","guid":{"rendered":"https:\/\/version-2.com\/?p=68990"},"modified":"2023-07-19T14:24:30","modified_gmt":"2023-07-19T06:24:30","slug":"rendering-storyblok-rich-text-in-astro","status":"publish","type":"post","link":"https:\/\/version-2.com\/zh\/2023\/07\/rendering-storyblok-rich-text-in-astro\/","title":{"rendered":"Rendering Storyblok Rich Text in Astro"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"68990\" class=\"elementor elementor-68990\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-35fe5dd post-content elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"35fe5dd\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[{&quot;jet_parallax_layout_image&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;_id&quot;:&quot;cef08c3&quot;,&quot;jet_parallax_layout_image_tablet&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_image_mobile&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_speed&quot;:{&quot;unit&quot;:&quot;%&quot;,&quot;size&quot;:50,&quot;sizes&quot;:[]},&quot;jet_parallax_layout_type&quot;:&quot;scroll&quot;,&quot;jet_parallax_layout_direction&quot;:&quot;1&quot;,&quot;jet_parallax_layout_fx_direction&quot;:null,&quot;jet_parallax_layout_z_index&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x&quot;:50,&quot;jet_parallax_layout_bg_x_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y&quot;:50,&quot;jet_parallax_layout_bg_y_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size&quot;:&quot;auto&quot;,&quot;jet_parallax_layout_bg_size_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_animation_prop&quot;:&quot;transform&quot;,&quot;jet_parallax_layout_on&quot;:[&quot;desktop&quot;,&quot;tablet&quot;]}]}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-409a2e9a\" data-id=\"409a2e9a\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5a8be8f elementor-widget elementor-widget-text-editor\" data-id=\"5a8be8f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"max-w-post-content\"><div class=\"block md:hidden\"><div><div class=\"block md:hidden\"><div class=\"container py-32 px-0 ContainerRebranded_container__ECREu\"><div class=\"flex justify-center\"><div class=\"Select_wrapper__2Wdo8 relative w-full\">Rendering Rich Text elements in headless content management systems (CMS) like Storyblok can be challenging. We decided to carry out this process with Astro. Here is what we learned in the process.<\/div><div><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full\" src=\"https:\/\/res.cloudinary.com\/nordsec\/f_auto,c_limit,w_1200,q_auto\/v1\/nord-security-web\/blog\/categories\/engineering\/2023\/07\/Blog-inside-image-storyblok-rich-text-rendering-in-astro.jpg\" width=\"1200\" height=\"548\" \/><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"my-64 text-center\"><p><span style=\"box-sizing: border-box; display: inline-block; overflow: hidden; width: initial; height: initial; background: none; opacity: 1; border: 0px; margin: 0px; padding: 0px; position: relative; max-width: 100%;\"><span style=\"box-sizing: border-box; display: block; width: initial; height: initial; background: none; opacity: 1; border: 0px; margin: 0px; padding: 0px; max-width: 100%;\"><img style=\"display: block; max-width: 100%; width: initial; height: initial; background: none; opacity: 1; border: 0px; margin: 0px; padding: 0px;\" alt=\"\" aria-hidden=\"true\" \/><br \/><\/span><b style=\"background-color: initial; color: #121213; font-size: 22px;\"><\/b><\/span><span style=\"box-sizing: border-box; display: inline-block; overflow: hidden; width: initial; height: initial; background: none; opacity: 1; border: 0px; margin: 0px; padding: 0px; position: relative; max-width: 100%;\"><b style=\"background-color: initial; color: #121213; font-size: 22px;\">Using an official integration<\/b><\/span><\/p><\/div><div class=\"style_postContent__uJLGT text-black break-words\" data-content-type-blog=\"true\"><div class=\"Article_wrapper__YyQ2_\"><p class=\"text-base leading-normal\">The Storyblok CMS has many integrations for various frontend frameworks, including React, Vue, and Svelte. Luckily for us, they also integrated it for Astro. Astro is the new kid on the block, with a vibrant and active community and a responsive developer team. These are just a few of the reasons that <a class=\"cursor-pointer outline-none transition-colors duration-250 ease-out text-blue-500 hover:text-blue-600 focus:text-blue-400\" href=\"https:\/\/nordsecurity.com\/blog\/why-we-chose-astro-for-our-websites\" target=\"_blank\" rel=\"noopener noreferrer\">we chose Astro<\/a> for website development.<\/p><p class=\"text-base leading-normal\">Headless CMS platforms are designed to provide content through APIs, allowing developers to use that content in various applications and front-end frameworks. The most straightforward way of using Storyblok in the Astro framework is through its official <a class=\"cursor-pointer outline-none transition-colors duration-250 ease-out text-blue-500 hover:text-blue-600 focus:text-blue-400\" href=\"https:\/\/www.npmjs.com\/package\/@storyblok\/astro\" target=\"_blank\" rel=\"noopener noreferrer\">storyblok-astro<\/a> integration.<\/p><p class=\"text-base leading-normal\">Rich Text elements often contain HTML tags, inline styles, and other formatting options that need to be properly rendered on the front end. Besides common WYSIWYG (\u201cwhat you see is what you get\u201d) editor capabilities, Storyblok is capable of allowing content editors to embed such elements as inline blocks (components), custom styling, emojis, quotes, and code snippets.<\/p><p class=\"text-base leading-normal\">The official integration provides an easy way to render Rich Text by using the <i>renderRichText<\/i><b> <\/b>function that comes with <i>@storyblok\/astro<\/i>:<\/p><div class=\"border-gray-300 border mb-32 \"><div class=\"bg-gray-200 p-24 border-b border-gray-300\"><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">import<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span> <span class=\"text-black\">RichTextSchema<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span><span class=\"text-black\"> renderRichText <\/span><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span> <span class=\"text-black\" style=\"color: #0e1b33;\">from<\/span> <span class=\"text-black\" style=\"color: #383c43;\">&#8220;@storyblok\/astro&#8221;<\/span><span class=\"text-black\" style=\"color: #6c6783;\">;<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">import<\/span> <span class=\"text-black\">cloneDeep<\/span> <span class=\"text-black\" style=\"color: #0e1b33;\">from<\/span> <span class=\"text-black\" style=\"color: #383c43;\">&#8220;clone-deep&#8221;<\/span><span class=\"text-black\" style=\"color: #6c6783;\">;<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">const<\/span><span class=\"text-black\"> mySchema <\/span><span class=\"text-black\" style=\"color: #383c43;\">=<\/span> <span class=\"text-black\" style=\"color: #0e1b33;\">cloneDeep<\/span><span class=\"text-black\" style=\"color: #6c6783;\">(<\/span><span class=\"text-black\">RichTextSchema<\/span><span class=\"text-black\" style=\"color: #6c6783;\">)<\/span><span class=\"text-black\" style=\"color: #6c6783;\">;<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">const<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><span class=\"text-black\"> blok <\/span><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span> <span class=\"text-black\" style=\"color: #383c43;\">=<\/span> <span class=\"text-black\">Astro<\/span><span class=\"text-black\" style=\"color: #6c6783;\">.<\/span><span class=\"text-black\">props<\/span><span class=\"text-black\" style=\"color: #6c6783;\">;<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">const<\/span><span class=\"text-black\"> renderedRichText <\/span><span class=\"text-black\" style=\"color: #383c43;\">=<\/span> <span class=\"text-black\" style=\"color: #0e1b33;\">renderRichText<\/span><span class=\"text-black\" style=\"color: #6c6783;\">(<\/span><span class=\"text-black\">blok<\/span><span class=\"text-black\" style=\"color: #6c6783;\">.<\/span><span class=\"text-black\">text<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #9a86fd;\">schema<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span><span class=\"text-black\"> mySchema<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">resolver<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">(<\/span><span class=\"text-black\">component<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span><span class=\"text-black\"> blok<\/span><span class=\"text-black\" style=\"color: #6c6783;\">)<\/span> <span class=\"text-black\" style=\"color: #383c43;\">=&gt;<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">switch<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">(<\/span><span class=\"text-black\">component<\/span><span class=\"text-black\" style=\"color: #6c6783;\">)<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">case<\/span> <span class=\"text-black\" style=\"color: #383c43;\">&#8220;my-custom-component&#8221;<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">return<\/span> <span class=\"text-black\" style=\"color: #383c43;\">`<\/span><span class=\"text-black\" style=\"color: #383c43;\">&lt;div class=&#8221;my-component-class&#8221;&gt;<\/span><span class=\"text-black\" style=\"color: #6c6783;\">${<\/span><span class=\"text-black\">blok<\/span><span class=\"text-black\" style=\"color: #6c6783;\">.<\/span><span class=\"text-black\">text<\/span><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #383c43;\">&lt;\/div&gt;<\/span><span class=\"text-black\" style=\"color: #383c43;\">`<\/span><span class=\"text-black\" style=\"color: #6c6783;\">;<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">break<\/span><span class=\"text-black\" style=\"color: #6c6783;\">;<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">default<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">return<\/span> <span class=\"text-black\" style=\"color: #383c43;\">`<\/span><span class=\"text-black\" style=\"color: #383c43;\">Component <\/span><span class=\"text-black\" style=\"color: #6c6783;\">${<\/span><span class=\"text-black\">component<\/span><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #383c43;\"> not found<\/span><span class=\"text-black\" style=\"color: #383c43;\">`<\/span><span class=\"text-black\" style=\"color: #6c6783;\">;<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #6c6783;\">)<\/span><span class=\"text-black\" style=\"color: #6c6783;\">;<\/span><\/div><\/div><pre class=\"text-small overflow-auto\">\u00a0<\/pre><\/div><\/div><h2 id=\"A challenge\" class=\"text-h2 leading-none text-left\"><b>A challenge<\/b><\/h2><p class=\"text-base leading-normal\">Although the <i>renderRichText <\/i>from <i>@storyblok\/astro<\/i> works fine and covered our most basic needs, it quickly turned out to be limiting and problematic for the following reasons:<\/p><ol><li class=\"ml-20\"><div><p class=\"text-base leading-normal\">The<i> renderRichText<\/i> utility cannot map Rich Text elements to actual Astro components and so cannot render embedded Storyblok components inside the Rich Text field in CMS.<\/p><\/div><\/li><li class=\"ml-20\"><div><p class=\"text-base leading-normal\">Links that you might want to pass through your app&#8217;s router cannot be reused because they require the actual function to be mapped with data.<\/p><p class=\"text-base leading-normal\">It is hard to maintain the string values, especially when complex needs arise \u2014 for example, when setting classes and other HTML properties dynamically. It may be possible to minimize the complexity by using some HTML parsers like <a class=\"cursor-pointer outline-none transition-colors duration-250 ease-out text-blue-500 hover:text-blue-600 focus:text-blue-400\" href=\"https:\/\/github.com\/natemoo-re\/ultrahtml\" target=\"_blank\" rel=\"noopener noreferrer\">ultrahtml<\/a>, but that does not eliminate the problem entirely.<\/p><\/div><\/li><\/ol><h2 id=\"The solution\" class=\"text-h2 leading-none text-left\"><b>The solution<\/b><\/h2><p class=\"text-base leading-normal\">Instead of dealing with HTML markup, <a class=\"cursor-pointer outline-none transition-colors duration-250 ease-out text-blue-500 hover:text-blue-600 focus:text-blue-400\" href=\"https:\/\/npmjs.com\/package\/storyblok-rich-text-astro-renderer\" target=\"_blank\" rel=\"noopener noreferrer\">storyblok-rich-text-astro-renderer<\/a> provides a capability to convert any Storyblok CMS Rich Text data structure into the nested component nodes structure \u2014 { <i>component, props, content <\/i>} \u2014 and render it with Astro. The configuration is easily extended to meet all project needs.<\/p><p class=\"text-base leading-normal\"><b>The package delivers:<\/b><\/p><ul class=\"list-disc ml-24\"><li class=\"ml-20\"><div><p class=\"text-base leading-normal\">The <i>RichTextRenderer.astro <\/i>helper component, which provides options to map any Storyblok Rich Text element to any custom component (for example, Astro, SolidJS, Svelte, or Vue).<\/p><\/div><\/li><li class=\"ml-20\"><div><p class=\"text-base leading-normal\">The <i>resolveRichTextToNodes <\/i>resolver utility can potentially reuse the transform utility before rendering the structure manually.<\/p><\/div><\/li><\/ul><h2 id=\"Using the package\" class=\"text-h2 leading-none text-left\"><b>Using the package<\/b><\/h2><p class=\"text-base leading-normal\">The usage of <a class=\"cursor-pointer outline-none transition-colors duration-250 ease-out text-blue-500 hover:text-blue-600 focus:text-blue-400\" href=\"https:\/\/npmjs.com\/package\/storyblok-rich-text-astro-renderer\" target=\"_blank\" rel=\"noopener noreferrer\">storyblok-rich-text-astro-renderer<\/a> is simple, yet flexible:<\/p><div class=\"border-gray-300 border mb-32 \"><div class=\"bg-gray-200 p-24 border-b border-gray-300\"><div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #383c43;\">&#8212;<\/span><span class=\"text-black\" style=\"color: #383c43;\">&#8211;<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">import<\/span> <span class=\"text-black\">RichTextRenderer<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><span class=\"text-black\"> type <\/span><span class=\"text-black\">RichTextType<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">}<\/span> <span class=\"text-black\" style=\"color: #0e1b33;\">from<\/span> <span class=\"text-black\" style=\"color: #383c43;\">&#8220;storyblok-rich-text-astro-renderer\/RichTextRenderer.astro&#8221;<\/span><span class=\"text-black\" style=\"color: #6c6783;\">;<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">import<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><span class=\"text-black\"> storyblokEditable <\/span><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span> <span class=\"text-black\" style=\"color: #0e1b33;\">from<\/span> <span class=\"text-black\" style=\"color: #383c43;\">&#8220;@storyblok\/astro&#8221;<\/span><span class=\"text-black\" style=\"color: #6c6783;\">;<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">export<\/span> <span class=\"text-black\" style=\"color: #0e1b33;\">interface<\/span> <span class=\"text-black\">Props<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #9a86fd;\">blok<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #9a86fd;\">text<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\">RichTextType<\/span><span class=\"text-black\" style=\"color: #6c6783;\">;<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #6c6783;\">;<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">const<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><span class=\"text-black\"> blok <\/span><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span> <span class=\"text-black\" style=\"color: #383c43;\">=<\/span> <span class=\"text-black\">Astro<\/span><span class=\"text-black\" style=\"color: #6c6783;\">.<\/span><span class=\"text-black\">props<\/span><span class=\"text-black\" style=\"color: #6c6783;\">;<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">const<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><span class=\"text-black\"> text <\/span><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span> <span class=\"text-black\" style=\"color: #383c43;\">=<\/span><span class=\"text-black\"> blok<\/span><span class=\"text-black\" style=\"color: #6c6783;\">;<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #383c43;\">&#8212;<\/span><span class=\"text-black\" style=\"color: #383c43;\">&#8211;<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\">\u00a0<\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #383c43;\">&lt;<\/span><span class=\"text-black\">RichTextRenderer<\/span><span class=\"text-black\"> content<\/span><span class=\"text-black\" style=\"color: #383c43;\">=<\/span><span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><span class=\"text-black\">text<\/span><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><span class=\"text-black\" style=\"color: #383c43;\">&#8230;<\/span><span class=\"text-black\" style=\"color: #0e1b33;\">storyblokEditable<\/span><span class=\"text-black\" style=\"color: #6c6783;\">(<\/span><span class=\"text-black\">blok<\/span><span class=\"text-black\" style=\"color: #6c6783;\">)<\/span><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span> <span class=\"text-black\" style=\"color: #383c43;\">\/<\/span><span class=\"text-black\" style=\"color: #383c43;\">&gt;<\/span><\/div><\/div><pre class=\"text-small overflow-auto\">\u00a0<\/pre><\/div><\/div><\/div><p class=\"text-base leading-normal\">Sensible default resolvers for marks and nodes are provided out of the box. You only have to provide resolvers if you want to override the default behavior.<\/p><p class=\"text-base leading-normal\">Use <i>resolver<\/i> to enable and control the rendering of embedded components, and schema to control how you want the nodes and marks to be rendered:<\/p><div class=\"border-gray-300 border mb-32 \"><div class=\"bg-gray-200 p-24 border-b border-gray-300\"><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #383c43;\">&lt;<\/span><span class=\"text-black\">RichTextRenderer<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\"> content<\/span><span class=\"text-black\" style=\"color: #383c43;\">=<\/span><span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><span class=\"text-black\">text<\/span><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\"> schema<\/span><span class=\"text-black\" style=\"color: #383c43;\">=<\/span><span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #9a86fd;\">nodes<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">heading<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">(<\/span><span class=\"text-black\" style=\"color: #6c6783;\">{<\/span> <span class=\"text-black\" style=\"color: #9a86fd;\">attrs<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><span class=\"text-black\"> level <\/span><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #6c6783;\">)<\/span> <span class=\"text-black\" style=\"color: #383c43;\">=&gt;<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">(<\/span><span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #9a86fd;\">component<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\">Text<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #9a86fd;\">props<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span> <span class=\"text-black\" style=\"color: #9a86fd;\">variant<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\" style=\"color: #383c43;\">`<\/span><span class=\"text-black\" style=\"color: #383c43;\">h<\/span><span class=\"text-black\" style=\"color: #6c6783;\">${<\/span><span class=\"text-black\">level<\/span><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #383c43;\">`<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #6c6783;\">)<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">paragraph<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">(<\/span><span class=\"text-black\" style=\"color: #6c6783;\">)<\/span> <span class=\"text-black\" style=\"color: #383c43;\">=&gt;<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">(<\/span><span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #9a86fd;\">component<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\">Text<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #9a86fd;\">props<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">class<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\" style=\"color: #383c43;\">&#8220;this-is-paragraph&#8221;<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #6c6783;\">)<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #9a86fd;\">marks<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">link<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">(<\/span><span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><span class=\"text-black\"> attrs <\/span><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #6c6783;\">)<\/span> <span class=\"text-black\" style=\"color: #383c43;\">=&gt;<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">const<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><span class=\"text-black\"> custom<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span> <span class=\"text-black\" style=\"color: #383c43;\">&#8230;<\/span><span class=\"text-black\">restAttrs <\/span><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span> <span class=\"text-black\" style=\"color: #383c43;\">=<\/span><span class=\"text-black\"> attrs<\/span><span class=\"text-black\" style=\"color: #6c6783;\">;<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">return<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #9a86fd;\">component<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\">Link<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #9a86fd;\">props<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #9a86fd;\">link<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span> <span class=\"text-black\" style=\"color: #383c43;\">&#8230;<\/span><span class=\"text-black\">custom<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span> <span class=\"text-black\" style=\"color: #383c43;\">&#8230;<\/span><span class=\"text-black\">restAttrs <\/span><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">class<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\" style=\"color: #383c43;\">&#8220;i-am-link&#8221;<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #6c6783;\">;<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\"> resolver<\/span><span class=\"text-black\" style=\"color: #383c43;\">=<\/span><span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><span class=\"text-black\" style=\"color: #6c6783;\">(<\/span><span class=\"text-black\">blok<\/span><span class=\"text-black\" style=\"color: #6c6783;\">)<\/span> <span class=\"text-black\" style=\"color: #383c43;\">=&gt;<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #0e1b33;\">return<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #9a86fd;\">component<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\">StoryblokComponent<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #9a86fd;\">props<\/span><span class=\"text-black\" style=\"color: #383c43;\">:<\/span> <span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><span class=\"text-black\"> blok <\/span><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #6c6783;\">,<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #6c6783;\">;<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #6c6783;\">{<\/span><span class=\"text-black\" style=\"color: #383c43;\">&#8230;<\/span><span class=\"text-black\" style=\"color: #0e1b33;\">storyblokEditable<\/span><span class=\"text-black\" style=\"color: #6c6783;\">(<\/span><span class=\"text-black\">blok<\/span><span class=\"text-black\" style=\"color: #6c6783;\">)<\/span><span class=\"text-black\" style=\"color: #6c6783;\">}<\/span><\/div><\/div><div class=\"table-row text-black\"><div class=\"table-cell\"><span class=\"text-black\" style=\"color: #383c43;\">\/<\/span><span class=\"text-black\" style=\"color: #383c43;\">&gt;<\/span><\/div><\/div><\/div><\/div><h2 id=\"Conclusion\" class=\"text-h2 leading-none text-left\"><b>Conclusion<\/b><\/h2><p class=\"text-base leading-normal\">That\u2019s all there is to it! We just made rendering Storyblok Rich Text in Astro much easier.<\/p><p class=\"text-base leading-normal\">The <a class=\"cursor-pointer outline-none transition-colors duration-250 ease-out text-blue-500 hover:text-blue-600 focus:text-blue-400\" href=\"https:\/\/npmjs.com\/package\/storyblok-rich-text-astro-renderer\" target=\"_blank\" rel=\"noopener noreferrer\">storyblok-rich-text-astro-renderer<\/a> package offers customization options and improves frontend development workflow, enabling you to tailor the rendering behavior to your project&#8217;s specific requirements.<\/p><p class=\"text-base leading-normal\">Even though Astro supports numerous integrations of React, Svelte, and Vue, when you want to go with bare Astro, the <i>storyblok-rich-text-astro-renderer<\/i> package is the right choice.<\/p><\/div><\/div><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2004c86 elementor-widget elementor-widget-shortcode\" data-id=\"2004c86\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">\t\t<div data-elementor-type=\"page\" data-elementor-id=\"18103\" class=\"elementor elementor-18103\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-748947f elementor-section-full_width elementor-section-height-default elementor-section-height-default\" data-id=\"748947f\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[{&quot;jet_parallax_layout_image&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;_id&quot;:&quot;c4f773e&quot;,&quot;jet_parallax_layout_image_tablet&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_image_mobile&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_speed&quot;:{&quot;unit&quot;:&quot;%&quot;,&quot;size&quot;:50,&quot;sizes&quot;:[]},&quot;jet_parallax_layout_type&quot;:&quot;scroll&quot;,&quot;jet_parallax_layout_direction&quot;:&quot;1&quot;,&quot;jet_parallax_layout_fx_direction&quot;:null,&quot;jet_parallax_layout_z_index&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x&quot;:50,&quot;jet_parallax_layout_bg_x_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y&quot;:50,&quot;jet_parallax_layout_bg_y_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size&quot;:&quot;auto&quot;,&quot;jet_parallax_layout_bg_size_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_animation_prop&quot;:&quot;transform&quot;,&quot;jet_parallax_layout_on&quot;:[&quot;desktop&quot;,&quot;tablet&quot;]}]}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7995c19\" data-id=\"7995c19\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a437045 elementor-widget elementor-widget-image-box\" data-id=\"a437045\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image-box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-image-box-wrapper\"><div class=\"elementor-image-box-content\"><h3 class=\"elementor-image-box-title\">About Version 2 Digital<\/h3><p class=\"elementor-image-box-description\">Version 2 Digital is one of the most dynamic IT companies in Asia. The company distributes a wide range of IT products across various areas including cyber security, cloud, data protection, end points, infrastructures, system monitoring, storage, networking, business productivity and communication products.\n<br><br>\nThrough an extensive network of channels, point of sales, resellers, and partnership companies, Version 2 offers quality products and services which are highly acclaimed in the market. Its customers cover a wide spectrum which include Global 1000 enterprises, regional listed companies, different vertical industries, public utilities, Government, a vast number of successful SMEs, and consumers in various Asian cities.<\/p><\/div><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t\n\t\t<div data-elementor-type=\"page\" data-elementor-id=\"63561\" class=\"elementor elementor-63561\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-1b6aa2c4 elementor-section-full_width elementor-section-height-default elementor-section-height-default\" data-id=\"1b6aa2c4\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[{&quot;_id&quot;:&quot;c4f773e&quot;,&quot;jet_parallax_layout_image&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_image_tablet&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_image_mobile&quot;:{&quot;url&quot;:&quot;&quot;,&quot;id&quot;:&quot;&quot;,&quot;size&quot;:&quot;&quot;},&quot;jet_parallax_layout_speed&quot;:{&quot;unit&quot;:&quot;%&quot;,&quot;size&quot;:50,&quot;sizes&quot;:[]},&quot;jet_parallax_layout_type&quot;:&quot;scroll&quot;,&quot;jet_parallax_layout_direction&quot;:&quot;1&quot;,&quot;jet_parallax_layout_fx_direction&quot;:null,&quot;jet_parallax_layout_z_index&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x&quot;:50,&quot;jet_parallax_layout_bg_x_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_x_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y&quot;:50,&quot;jet_parallax_layout_bg_y_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_y_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size&quot;:&quot;auto&quot;,&quot;jet_parallax_layout_bg_size_tablet&quot;:&quot;&quot;,&quot;jet_parallax_layout_bg_size_mobile&quot;:&quot;&quot;,&quot;jet_parallax_layout_animation_prop&quot;:&quot;transform&quot;,&quot;jet_parallax_layout_on&quot;:[&quot;desktop&quot;,&quot;tablet&quot;]}]}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-1b283ee5\" data-id=\"1b283ee5\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4e466f1a elementor-widget elementor-widget-text-editor\" data-id=\"4e466f1a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong>About NordLayer<br \/><\/strong>NordLayer is an adaptive network access security solution for modern businesses \u2013 from the world\u2019s most trusted cybersecurity brand, Nord Security.<\/p><p>The web has become a chaotic space where safety and trust have been compromised by cybercrime and data protection issues. Therefore, our team has a global mission to shape a more trusted and peaceful online future for people everywhere.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Rendering Rich Text elements in headless content manage [&hellip;]<\/p>\n","protected":false},"author":149011790,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":true},"categories":[1075,1130,973,61],"tags":[1076,1132,974],"class_list":["post-68990","post","type-post","status-publish","format-standard","hentry","category-year2023","category-nordlayer","category-nord-security","category-press-release","tag-1076","tag-nordlayer","tag-nord-security"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Rendering Storyblok Rich Text in Astro - Version 2<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/nordsecurity.com\/blog\/rendering-storyblok-rich-text-in-astro\" \/>\n<meta property=\"og:locale\" content=\"zh_HK\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Rendering Storyblok Rich Text in Astro - Version 2\" \/>\n<meta property=\"og:description\" content=\"Rendering Rich Text elements in headless content manage [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nordsecurity.com\/blog\/rendering-storyblok-rich-text-in-astro\" \/>\n<meta property=\"og:site_name\" content=\"Version 2\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-19T04:06:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-19T06:24:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/nordsec\/f_auto,c_limit,w_1200,q_auto\/v1\/nord-security-web\/blog\/categories\/engineering\/2023\/07\/Blog-inside-image-storyblok-rich-text-rendering-in-astro.jpg\" \/>\n<meta name=\"author\" content=\"tracylamv2\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"tracylamv2\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9810\u8a08\u95b1\u8b80\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 \u5206\u9418\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/nordsecurity.com\\\/blog\\\/rendering-storyblok-rich-text-in-astro#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/2023\\\/07\\\/rendering-storyblok-rich-text-in-astro\\\/\"},\"author\":{\"name\":\"tracylamv2\",\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#\\\/schema\\\/person\\\/011bc7c3731c930bcfeecd52fefb6365\"},\"headline\":\"Rendering Storyblok Rich Text in Astro\",\"datePublished\":\"2023-07-19T04:06:42+00:00\",\"dateModified\":\"2023-07-19T06:24:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/2023\\\/07\\\/rendering-storyblok-rich-text-in-astro\\\/\"},\"wordCount\":703,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/nordsecurity.com\\\/blog\\\/rendering-storyblok-rich-text-in-astro#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/res.cloudinary.com\\\/nordsec\\\/f_auto,c_limit,w_1200,q_auto\\\/v1\\\/nord-security-web\\\/blog\\\/categories\\\/engineering\\\/2023\\\/07\\\/Blog-inside-image-storyblok-rich-text-rendering-in-astro.jpg\",\"keywords\":[\"2023\",\"NordLayer\",\"Nord Security\"],\"articleSection\":[\"2023\",\"NordLayer\",\"Nord Security\",\"Press Release\"],\"inLanguage\":\"zh-HK\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/nordsecurity.com\\\/blog\\\/rendering-storyblok-rich-text-in-astro#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/version-2.com\\\/2023\\\/07\\\/rendering-storyblok-rich-text-in-astro\\\/\",\"url\":\"https:\\\/\\\/nordsecurity.com\\\/blog\\\/rendering-storyblok-rich-text-in-astro\",\"name\":\"Rendering Storyblok Rich Text in Astro - Version 2\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/nordsecurity.com\\\/blog\\\/rendering-storyblok-rich-text-in-astro#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/nordsecurity.com\\\/blog\\\/rendering-storyblok-rich-text-in-astro#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/res.cloudinary.com\\\/nordsec\\\/f_auto,c_limit,w_1200,q_auto\\\/v1\\\/nord-security-web\\\/blog\\\/categories\\\/engineering\\\/2023\\\/07\\\/Blog-inside-image-storyblok-rich-text-rendering-in-astro.jpg\",\"datePublished\":\"2023-07-19T04:06:42+00:00\",\"dateModified\":\"2023-07-19T06:24:30+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/nordsecurity.com\\\/blog\\\/rendering-storyblok-rich-text-in-astro#breadcrumb\"},\"inLanguage\":\"zh-HK\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/nordsecurity.com\\\/blog\\\/rendering-storyblok-rich-text-in-astro\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-HK\",\"@id\":\"https:\\\/\\\/nordsecurity.com\\\/blog\\\/rendering-storyblok-rich-text-in-astro#primaryimage\",\"url\":\"https:\\\/\\\/res.cloudinary.com\\\/nordsec\\\/f_auto,c_limit,w_1200,q_auto\\\/v1\\\/nord-security-web\\\/blog\\\/categories\\\/engineering\\\/2023\\\/07\\\/Blog-inside-image-storyblok-rich-text-rendering-in-astro.jpg\",\"contentUrl\":\"https:\\\/\\\/res.cloudinary.com\\\/nordsec\\\/f_auto,c_limit,w_1200,q_auto\\\/v1\\\/nord-security-web\\\/blog\\\/categories\\\/engineering\\\/2023\\\/07\\\/Blog-inside-image-storyblok-rich-text-rendering-in-astro.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/nordsecurity.com\\\/blog\\\/rendering-storyblok-rich-text-in-astro#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9801\",\"item\":\"https:\\\/\\\/version-2.com\\\/zh\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Rendering Storyblok Rich Text in Astro\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#website\",\"url\":\"https:\\\/\\\/version-2.com\\\/zh\\\/\",\"name\":\"Version 2\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/version-2.com\\\/zh\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-HK\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#organization\",\"name\":\"Version 2\",\"url\":\"https:\\\/\\\/version-2.com\\\/zh\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-HK\",\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/version-2.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/v2-hk-hor-4.png?fit=1795%2C335&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/version-2.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/v2-hk-hor-4.png?fit=1795%2C335&ssl=1\",\"width\":1795,\"height\":335,\"caption\":\"Version 2\"},\"image\":{\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/version-2.com\\\/zh\\\/#\\\/schema\\\/person\\\/011bc7c3731c930bcfeecd52fefb6365\",\"name\":\"tracylamv2\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-HK\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9d01d79cbfd8b2e878f5d701a362cc9fca466d33fec977b59706c23c1a2db15c?s=96&d=identicon&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9d01d79cbfd8b2e878f5d701a362cc9fca466d33fec977b59706c23c1a2db15c?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9d01d79cbfd8b2e878f5d701a362cc9fca466d33fec977b59706c23c1a2db15c?s=96&d=identicon&r=g\",\"caption\":\"tracylamv2\"},\"url\":\"https:\\\/\\\/version-2.com\\\/zh\\\/author\\\/tracylamv2\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Rendering Storyblok Rich Text in Astro - Version 2","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/nordsecurity.com\/blog\/rendering-storyblok-rich-text-in-astro","og_locale":"zh_HK","og_type":"article","og_title":"Rendering Storyblok Rich Text in Astro - Version 2","og_description":"Rendering Rich Text elements in headless content manage [&hellip;]","og_url":"https:\/\/nordsecurity.com\/blog\/rendering-storyblok-rich-text-in-astro","og_site_name":"Version 2","article_published_time":"2023-07-19T04:06:42+00:00","article_modified_time":"2023-07-19T06:24:30+00:00","og_image":[{"url":"https:\/\/res.cloudinary.com\/nordsec\/f_auto,c_limit,w_1200,q_auto\/v1\/nord-security-web\/blog\/categories\/engineering\/2023\/07\/Blog-inside-image-storyblok-rich-text-rendering-in-astro.jpg","type":"","width":"","height":""}],"author":"tracylamv2","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"tracylamv2","\u9810\u8a08\u95b1\u8b80\u6642\u9593":"6 \u5206\u9418"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/nordsecurity.com\/blog\/rendering-storyblok-rich-text-in-astro#article","isPartOf":{"@id":"https:\/\/version-2.com\/2023\/07\/rendering-storyblok-rich-text-in-astro\/"},"author":{"name":"tracylamv2","@id":"https:\/\/version-2.com\/zh\/#\/schema\/person\/011bc7c3731c930bcfeecd52fefb6365"},"headline":"Rendering Storyblok Rich Text in Astro","datePublished":"2023-07-19T04:06:42+00:00","dateModified":"2023-07-19T06:24:30+00:00","mainEntityOfPage":{"@id":"https:\/\/version-2.com\/2023\/07\/rendering-storyblok-rich-text-in-astro\/"},"wordCount":703,"commentCount":0,"publisher":{"@id":"https:\/\/version-2.com\/zh\/#organization"},"image":{"@id":"https:\/\/nordsecurity.com\/blog\/rendering-storyblok-rich-text-in-astro#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/nordsec\/f_auto,c_limit,w_1200,q_auto\/v1\/nord-security-web\/blog\/categories\/engineering\/2023\/07\/Blog-inside-image-storyblok-rich-text-rendering-in-astro.jpg","keywords":["2023","NordLayer","Nord Security"],"articleSection":["2023","NordLayer","Nord Security","Press Release"],"inLanguage":"zh-HK","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/nordsecurity.com\/blog\/rendering-storyblok-rich-text-in-astro#respond"]}]},{"@type":"WebPage","@id":"https:\/\/version-2.com\/2023\/07\/rendering-storyblok-rich-text-in-astro\/","url":"https:\/\/nordsecurity.com\/blog\/rendering-storyblok-rich-text-in-astro","name":"Rendering Storyblok Rich Text in Astro - Version 2","isPartOf":{"@id":"https:\/\/version-2.com\/zh\/#website"},"primaryImageOfPage":{"@id":"https:\/\/nordsecurity.com\/blog\/rendering-storyblok-rich-text-in-astro#primaryimage"},"image":{"@id":"https:\/\/nordsecurity.com\/blog\/rendering-storyblok-rich-text-in-astro#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/nordsec\/f_auto,c_limit,w_1200,q_auto\/v1\/nord-security-web\/blog\/categories\/engineering\/2023\/07\/Blog-inside-image-storyblok-rich-text-rendering-in-astro.jpg","datePublished":"2023-07-19T04:06:42+00:00","dateModified":"2023-07-19T06:24:30+00:00","breadcrumb":{"@id":"https:\/\/nordsecurity.com\/blog\/rendering-storyblok-rich-text-in-astro#breadcrumb"},"inLanguage":"zh-HK","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nordsecurity.com\/blog\/rendering-storyblok-rich-text-in-astro"]}]},{"@type":"ImageObject","inLanguage":"zh-HK","@id":"https:\/\/nordsecurity.com\/blog\/rendering-storyblok-rich-text-in-astro#primaryimage","url":"https:\/\/res.cloudinary.com\/nordsec\/f_auto,c_limit,w_1200,q_auto\/v1\/nord-security-web\/blog\/categories\/engineering\/2023\/07\/Blog-inside-image-storyblok-rich-text-rendering-in-astro.jpg","contentUrl":"https:\/\/res.cloudinary.com\/nordsec\/f_auto,c_limit,w_1200,q_auto\/v1\/nord-security-web\/blog\/categories\/engineering\/2023\/07\/Blog-inside-image-storyblok-rich-text-rendering-in-astro.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/nordsecurity.com\/blog\/rendering-storyblok-rich-text-in-astro#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9801","item":"https:\/\/version-2.com\/zh\/"},{"@type":"ListItem","position":2,"name":"Rendering Storyblok Rich Text in Astro"}]},{"@type":"WebSite","@id":"https:\/\/version-2.com\/zh\/#website","url":"https:\/\/version-2.com\/zh\/","name":"Version 2","description":"","publisher":{"@id":"https:\/\/version-2.com\/zh\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/version-2.com\/zh\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-HK"},{"@type":"Organization","@id":"https:\/\/version-2.com\/zh\/#organization","name":"Version 2","url":"https:\/\/version-2.com\/zh\/","logo":{"@type":"ImageObject","inLanguage":"zh-HK","@id":"https:\/\/version-2.com\/zh\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/version-2.com\/wp-content\/uploads\/2020\/08\/v2-hk-hor-4.png?fit=1795%2C335&ssl=1","contentUrl":"https:\/\/i0.wp.com\/version-2.com\/wp-content\/uploads\/2020\/08\/v2-hk-hor-4.png?fit=1795%2C335&ssl=1","width":1795,"height":335,"caption":"Version 2"},"image":{"@id":"https:\/\/version-2.com\/zh\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/version-2.com\/zh\/#\/schema\/person\/011bc7c3731c930bcfeecd52fefb6365","name":"tracylamv2","image":{"@type":"ImageObject","inLanguage":"zh-HK","@id":"https:\/\/secure.gravatar.com\/avatar\/9d01d79cbfd8b2e878f5d701a362cc9fca466d33fec977b59706c23c1a2db15c?s=96&d=identicon&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9d01d79cbfd8b2e878f5d701a362cc9fca466d33fec977b59706c23c1a2db15c?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9d01d79cbfd8b2e878f5d701a362cc9fca466d33fec977b59706c23c1a2db15c?s=96&d=identicon&r=g","caption":"tracylamv2"},"url":"https:\/\/version-2.com\/zh\/author\/tracylamv2\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pbQRKm-hWK","post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/posts\/68990","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/users\/149011790"}],"replies":[{"embeddable":true,"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/comments?post=68990"}],"version-history":[{"count":7,"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/posts\/68990\/revisions"}],"predecessor-version":[{"id":69195,"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/posts\/68990\/revisions\/69195"}],"wp:attachment":[{"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/media?parent=68990"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/categories?post=68990"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/version-2.com\/zh\/wp-json\/wp\/v2\/tags?post=68990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}