From c551328bfd5b70be804332396fd85666c655bd19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A4=E4=B9=8B=E7=95=8C?= Date: Fri, 25 Oct 2024 12:44:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=AD=A3=20Open=20Graph=20?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=95=B8=E5=80=BC=E4=B8=A6=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E5=85=A7=E5=BB=BA=E7=9A=84=20GA=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/locales/default.json | 6 +++--- nuxt.config.js | 5 ++--- plugins/analytics.js | 38 ------------------------------------- 3 files changed, 5 insertions(+), 44 deletions(-) delete mode 100644 plugins/analytics.js diff --git a/assets/locales/default.json b/assets/locales/default.json index 86d74a6..26d0a6b 100644 --- a/assets/locales/default.json +++ b/assets/locales/default.json @@ -1,9 +1,9 @@ { "site": { "title": "【玖玖巴按鈕】", - "description": "", - "keywords": "VTuber Button 玖玖巴 孤之界", - "url": "https://998-voice.konnokai.me", + "description": "就只是個狐仙按鈕網站", + "keywords": "VTuber VoiceButton 玖玖巴 孤之界", + "url": "https://998-button.konnokai.me", "social_image": "https://i.imgur.com/vOAsBZ3.png", "index": "首頁", "links": "友情鏈接", diff --git a/nuxt.config.js b/nuxt.config.js index 7910a0f..89c3a32 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -29,7 +29,7 @@ export default { }, { hid: 'og:site_name', property: 'og:site_name', content: trs.site.title }, { hid: 'og:type', property: 'og:type', content: 'website' }, - { hid: 'og:url', property: 'og:url', content: trs.site.title }, + { hid: 'og:url', property: 'og:url', content: trs.site.url }, { hid: 'og:title', property: 'og:title', content: trs.site.title }, { hid: 'og:description', @@ -48,7 +48,7 @@ export default { /* ** Customize the progress-bar color */ - loading: { color: '#fff' }, + loading: { color: '#f18465' }, /* ** Global CSS */ @@ -59,7 +59,6 @@ export default { plugins: [ { src: '@plugins/i18n' }, { src: '@plugins/eventBus.js', mode: 'client' }, - { src: '@plugins/analytics.js', mode: 'client' }, { src: '@plugins/route.js', mode: 'client' } ], /* diff --git a/plugins/analytics.js b/plugins/analytics.js deleted file mode 100644 index fc9a781..0000000 --- a/plugins/analytics.js +++ /dev/null @@ -1,38 +0,0 @@ -/* eslint-disable */ -if (process.client && process.env.NODE_ENV === 'production') { - /* - ** Google 统计分析脚本 - */ - (function (i, s, o, g, r, a, m) { - i.GoogleAnalyticsObject = r; - (i[r] = - i[r] || - function () { - (i[r].q = i[r].q || []).push(arguments); - }), - (i[r].l = 1 * new Date()); - (a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]); - a.async = 1; - a.src = g; - m.parentNode.insertBefore(a, m); - })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'); - /* - ** 当前页的访问统计 - */ - ga('create', 'UA-XXXXXXXXX-X', 'auto'); - } - - export default ({ app: { router }, store }) => { - /* - ** 每次路由变更时进行pv统计 - */ - if (process.client && process.env.NODE_ENV === 'production') { - router.afterEach((to, from) => { - /* - ** 告诉 GA 增加一个 PV - */ - ga('set', 'page', to.fullPath); - ga('send', 'pageview'); - }); - } - };