From baee803689e59ca254700fac255beca323abd58f Mon Sep 17 00:00:00 2001 From: SamirLiu Date: Fri, 9 May 2025 13:28:01 +0800 Subject: [PATCH] feat: move noscript to additional-js --- layout/includes/additional-js.pug | 6 +++++- layout/includes/layout.pug | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/layout/includes/additional-js.pug b/layout/includes/additional-js.pug index 5312260..6467864 100644 --- a/layout/includes/additional-js.pug +++ b/layout/includes/additional-js.pug @@ -54,4 +54,8 @@ div if theme.busuanzi.site_uv || theme.busuanzi.site_pv || theme.busuanzi.page_pv script(async data-pjax src= theme.asset.busuanzi || '//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js') - != partial('includes/third-party/search/index', {}, { cache: true }) \ No newline at end of file + != partial('includes/third-party/search/index', {}, { cache: true }) + + if (theme.google_tag_manager && theme.google_tag_manager.tag_id) + noscript + iframe(src=`${theme.google_tag_manager.domain ? theme.google_tag_manager.domain : 'https://www.googletagmanager.com'}/ns.html?id=${theme.google_tag_manager.tag_id}` height="0" width="0" style="display:none;visibility:hidden") \ No newline at end of file diff --git a/layout/includes/layout.pug b/layout/includes/layout.pug index e8f6979..ef6a46b 100644 --- a/layout/includes/layout.pug +++ b/layout/includes/layout.pug @@ -10,10 +10,6 @@ html(lang=config.language data-theme=theme.display_mode class=htmlClassHideAside head include ./head.pug body - if (theme.google_tag_manager && theme.google_tag_manager.tag_id) - noscript - iframe(src=`${theme.google_tag_manager.domain ? theme.google_tag_manager.domain : 'https://www.googletagmanager.com'}/ns.html?id=${theme.google_tag_manager.tag_id}` height="0" width="0" style="display:none;visibility:hidden") - !=partial('includes/loading/index', {}, {cache: true}) if theme.background