๐Ÿ”ฎ Sanity Create is here. Writing is reinvented. Try now, no developer setup

Issue with missing icon in portable text for internal links in Sanity.io

7 replies
Last updated: Aug 15, 2022
user Y
I was following the guide you created for internal and external links and it says it will add an icon to the portable text. In your screenshot it seems to add the :sanity: icon. However, in Chrome and Safari I get this... How do I get the :sanity: icon? ๐Ÿ˜…
Aug 13, 2022, 5:05 AM
What does your code for the internal link look like?
Aug 15, 2022, 3:52 PM
            name: "internalLink",
            title: "Internal Link",
            type: "object",
            fields: [
                title: "Reference",
                name: "reference",
                type: "reference",
                to: [{ type: "post" }],
Aug 15, 2022, 4:06 PM
Got it! If you specify an icon using
does it work?
Aug 15, 2022, 4:48 PM
Oh yeah specifying the icon works, but in the documentation it isn't specified and it has the sanity icon by default which I thought was pretty cool but can't seem to find that icon ๐Ÿ˜…
Aug 15, 2022, 4:50 PM
It used to just set the S icon by default! I'm not sure when it changed...
Aug 15, 2022, 4:55 PM
Time to look at the change history ๐Ÿ˜… can the S icon be made available in the sanity icon library?
Aug 15, 2022, 4:57 PM
I can't find it in the icons package either! In the mean time, this SVG should work:
<svg width="16px" viewBox="0 0 654 869" version="1.1" xmlns="<http://www.w3.org/2000/svg>">
    <g id="Page-1" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
      <g id="sanity-logo-s-(1)" fill="currentColor" fillRule="nonzero">
        <path d="M343.36,744.64 C251.78,744.64 187.08,704.35 159.98,630.86 L0.46,630.86 C34.6,780.14 162,868.65 344.77,868.65 C453.44,868.65 546.21,830.93 600.45,764.96 C598.22,697.56 576,647.43 529,609.34 C513.78,693.66 445.35,744.64 343.36,744.64 Z" id="Path"></path>
        <path d="M320.67,123.39 C429.86,123.39 473.76,185.33 491.09,228.56 L643.69,228.56 C608.91,83.5 491.64,0.76 319.25,0.76 C214.4,0.76 124.31,39.4 71,107 C73.64,167.86 97.19,215.7 143.35,252.26 C160.62,172.94 227.15,123.39 320.67,123.39 Z" id="Path"></path>
        <path d="M436.38,381 L277.65,343.62 C234.863333,332.62 197.98,318.646667 167,301.7 C97.3,263.5 57.17,210 45.6,140 C45.17,140.87 44.76,141.76 44.34,142.63 C28.55,175.42 20.34,212.07 20.34,250.63 C20.34,371.11 89.02,445.51 230.34,478.08 L386.18,514 C432.4,526.19 471.41,540.84 503.74,558.49 C577.39,598.69 616.34,654.49 626.53,732.16 C626.9,731.44 627.25,730.71 627.61,729.99 C644.78,696.05 653.47,657.76 653.47,615.61 C653.49,463.53 535.43,404.08 436.38,381 Z" id="Path"></path>
Aug 15, 2022, 5:24 PM

Sanityโ€“ build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?