"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([["3806"],{4457:function(e,s,t){t.r(s),t.d(s,{default:()=>h,frontMatter:()=>i,metadata:()=>n,assets:()=>l,toc:()=>d,contentTitle:()=>o});var n=JSON.parse('{"id":"features/data-urls","title":"Data URLs","description":"Data URLs, URLs prefixed with the data: scheme, allow content creators to embed small files inline in documents.","source":"@site/docs/features/data-urls.mdx","sourceDirName":"features","slug":"/features/data-urls","permalink":"/docs/features/data-urls","draft":false,"unlisted":false,"editUrl":"https://github.com/live-codes/livecodes/tree/develop/docs/docs/features/data-urls.mdx","tags":[],"version":"current","frontMatter":{},"sidebar":"docsSidebar","previous":{"title":"Code Prefill","permalink":"/docs/features/code-prefill"},"next":{"title":"Deploy","permalink":"/docs/features/deploy"}}'),a=t("5893"),r=t("65");let i={},o="Data URLs",l={},d=[{value:"Creating data URLs",id:"creating-data-urls",level:2},{value:"Assets",id:"assets",level:3},{value:""Copy code as data URL" button",id:"copy-code-as-data-url-button",level:3},{value:"Consuming data URLs",id:"consuming-data-urls",level:2},{value:"Example",id:"example",level:2},{value:"Related",id:"related",level:2}];function c(e){let s={a:"a",admonition:"admonition",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.a)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.header,{children:(0,a.jsx)(s.h1,{id:"data-urls",children:"Data URLs"})}),"\n",(0,a.jsxs)(s.blockquote,{children:["\n",(0,a.jsxs)(s.p,{children:[(0,a.jsx)(s.strong,{children:"Data URLs"}),", URLs prefixed with the ",(0,a.jsx)(s.code,{children:"data:"})," scheme, allow content creators to embed small files inline in documents."]}),"\n",(0,a.jsxs)(s.p,{children:["\u2014 ",(0,a.jsx)(s.a,{href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs",children:"MDN"})]}),"\n"]}),"\n",(0,a.jsxs)(s.p,{children:["Sometimes, you need to use an external file (e.g. script, stylesheet) that is not hosted online. In this case, you can use data URLs to embed the file in your code. These can then be used similar to regular URLs (e.g. for ",(0,a.jsx)(s.code,{children:"