在关闭之前,我该如何嵌入片段。在纪录片中标记?

发布于 2025-01-29 19:13:45 字数 781 浏览 2 评论 0原文

我想在我的Docusaurus网站上的</body>标签之前立即安装此片段。

<script type="text/javascript">
  window._mfq = window._mfq || [];
  (function() {
    var mf = document.createElement("script");
    mf.type = "text/javascript"; mf.defer = true;
    mf.src = "//cdn.mouseflow.com/projects/95f.js";
    document.getElementsByTagName("head")[0].appendChild(mf);
  })();
</script>

I see the concept of postBodyTags at https://docusaurus. io/docs/api/docusaurus-config#ssrtemplate ,但没有证件。

我是否应该假装我没有注意到postbodytags的概念,而只是编辑ssrtemplate html字符串以包含我的片段?

I want to install this snippet immediately before the </body> tag on my Docusaurus site.

<script type="text/javascript">
  window._mfq = window._mfq || [];
  (function() {
    var mf = document.createElement("script");
    mf.type = "text/javascript"; mf.defer = true;
    mf.src = "//cdn.mouseflow.com/projects/95f.js";
    document.getElementsByTagName("head")[0].appendChild(mf);
  })();
</script>

I see the concept of postBodyTags at https://docusaurus.io/docs/api/docusaurus-config#ssrTemplate, but it's undocumented.

Should I just pretend that I didn't notice the concept of postBodyTags and just edit the ssrTemplate HTML string to include my snippet?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文