timlrx/tailwind-nextjs-starter-blog

Where should I put this script?

開放

#874 建立於 2024年3月16日

 (3 則留言) (0 個反應) (0 位負責人)JavaScript (1,222 個分叉)batch import
help wanted

倉庫指標

星標
 (4,927 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Hi there,

I am trying to put a script into my blog:

<script data-grow-initializer="">!(function(){window.growMe||((window.growMe=function(e){window.growMe._.push(e);}),(window.growMe._=[]));var e=document.createElement("script");(e.type="text/javascript"),(e.src="https://faves.grow.me/main.js"),(e.defer=!0),e.setAttribute("data-grow-faves-site-id","dfsdfsdf=");var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t);})();</script>

I previously would put this in _document.js, but this is no longer available. I have tried layout.tsx but it is not registering the script even though I see it in the head.

Any help is much appreciated <3

貢獻者指南