mirror of
https://github.com/ipfs/ipfs-blog.git
synced 2026-03-28 17:32:37 +01:00
refactor: excude analytics based on CANONICAL_BASE config cc @jdiogopeixoto
This commit is contained in:
@@ -64,7 +64,6 @@ module.exports = {
|
||||
title: 'IPFS Blog & News',
|
||||
description:
|
||||
'All the latest information about the IPFS Project in one place: blog posts, release notes, videos, news coverage, and more.',
|
||||
domain: CANONICAL_BASE,
|
||||
locales: {
|
||||
'/': {
|
||||
lang: 'EN',
|
||||
@@ -96,6 +95,7 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
themeConfig: {
|
||||
domain: CANONICAL_BASE,
|
||||
locales: {
|
||||
'/': themeConfigDefaults,
|
||||
'/zh-cn/': {
|
||||
@@ -227,11 +227,11 @@ module.exports = {
|
||||
['_blog'].some((folder) => $page.regularPath.startsWith('/' + folder))
|
||||
? 'article'
|
||||
: 'website',
|
||||
url: (_, $site, path) => ($site.domain || '') + path,
|
||||
url: (_, $site, path) => ($site.themeConfig.domain || '') + path,
|
||||
image: ($page, $site) =>
|
||||
$page.frontmatter.header_image
|
||||
? ($site.domain || '') + $page.frontmatter.header_image
|
||||
: ($site.domain || '') + '/social-card.png',
|
||||
? ($site.themeConfig.domain || '') + $page.frontmatter.header_image
|
||||
: ($site.themeConfig.domain || '') + '/social-card.png',
|
||||
publishedAt: ($page) =>
|
||||
$page.frontmatter.date &&
|
||||
new Date($page.frontmatter.date).toISOString(),
|
||||
|
||||
@@ -38,7 +38,9 @@ export default {
|
||||
},
|
||||
|
||||
beforeMount() {
|
||||
countly.loadScript()
|
||||
if (!this.$isServer && this.$themeConfig.domain) {
|
||||
countly.loadScript()
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
@@ -44,8 +44,6 @@ export function loadScript() {
|
||||
Track an event to countly with the provided data
|
||||
*/
|
||||
export function trackEvent(event, data = {}) {
|
||||
// console.info('[countly]', 'trackEvent()', event, data)
|
||||
|
||||
window.Countly.q.push([
|
||||
'add_event',
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user