diff --git a/src/.vuepress/config.js b/src/.vuepress/config.js index 04744675..6c01a344 100644 --- a/src/.vuepress/config.js +++ b/src/.vuepress/config.js @@ -3,7 +3,6 @@ const { reverse, sortBy } = require('lodash') // configure this to an absolute url to enable a generated sitemap & blog RSS feeds const CANONICAL_BASE = process.env.CANONICAL_BASE || 'https://blog.ipfs.tech' const IPFS_DEPLOY = process.env.IPFS_DEPLOY === 'true' || false -const SPEEDCURVE_ID = process.env.SPEEDCURVE_ID || '' const themeConfigDefaults = { dateFormat: 'DD MMMM YYYY', @@ -132,7 +131,6 @@ module.exports = { }, }, plugins: [ - [require('./plugins/vuepress-plugin-speedcurve'), { id: SPEEDCURVE_ID }], ['@vuepress/last-updated'], [ 'vuepress-plugin-clean-urls', @@ -242,22 +240,22 @@ module.exports = { 'vuepress-plugin-container', { type: 'callout', - defaultTitle: '' - } + defaultTitle: '', + }, ], [ 'vuepress-plugin-container', { type: 'right', - defaultTitle: '' - } + defaultTitle: '', + }, ], [ 'vuepress-plugin-container', { type: 'left', - defaultTitle: '' - } + defaultTitle: '', + }, ], 'vuepress-plugin-chunkload-redirect', ['vuepress-plugin-ipfs', IPFS_DEPLOY], diff --git a/src/.vuepress/plugins/vuepress-plugin-speedcurve/enhanceAppFiles.js b/src/.vuepress/plugins/vuepress-plugin-speedcurve/enhanceAppFiles.js deleted file mode 100644 index ed374582..00000000 --- a/src/.vuepress/plugins/vuepress-plugin-speedcurve/enhanceAppFiles.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict' - -/* global SPEEDCURVE_ID */ - -module.exports = () => { - if ( - process.env.NODE_ENV === 'production' && - SPEEDCURVE_ID && - typeof window !== 'undefined' - ) { - ;(function () { - const customScriptCode = `LUX=(function(){var a=("undefined"!==typeof(LUX)&&"undefined"!==typeof(LUX.gaMarks)?LUX.gaMarks:[]);var d=("undefined"!==typeof(LUX)&&"undefined"!==typeof(LUX.gaMeasures)?LUX.gaMeasures:[]);var j="LUX_start";var k=window.performance;var l=("undefined"!==typeof(LUX)&&LUX.ns?LUX.ns:(Date.now?Date.now():+(new Date())));if(k&&k.timing&&k.timing.navigationStart){l=k.timing.navigationStart}function f(){if(k&&k.now){return k.now()}var o=Date.now?Date.now():+(new Date());return o-l}function b(n){if(k){if(k.mark){return k.mark(n)}else{if(k.webkitMark){return k.webkitMark(n)}}}a.push({name:n,entryType:"mark",startTime:f(),duration:0});return}function m(p,t,n){if("undefined"===typeof(t)&&h(j)){t=j}if(k){if(k.measure){if(t){if(n){return k.measure(p,t,n)}else{return k.measure(p,t)}}else{return k.measure(p)}}else{if(k.webkitMeasure){return k.webkitMeasure(p,t,n)}}}var r=0,o=f();if(t){var s=h(t);if(s){r=s.startTime}else{if(k&&k.timing&&k.timing[t]){r=k.timing[t]-k.timing.navigationStart}else{return}}}if(n){var q=h(n);if(q){o=q.startTime}else{if(k&&k.timing&&k.timing[n]){o=k.timing[n]-k.timing.navigationStart}else{return}}}d.push({name:p,entryType:"measure",startTime:r,duration:(o-r)});return}function h(n){return c(n,g())}function c(p,o){for(i=o.length-1;i>=0;i--){var n=o[i];if(p===n.name){return n}}return undefined}function g(){if(k){if(k.getEntriesByType){return k.getEntriesByType("mark")}else{if(k.webkitGetEntriesByType){return k.webkitGetEntriesByType("mark")}}}return a}return{mark:b,measure:m,gaMarks:a,gaMeasures:d}})();LUX.ns=(Date.now?Date.now():+(new Date()));LUX.ac=[];LUX.cmd=function(a){LUX.ac.push(a)};LUX.init=function(){LUX.cmd(["init"])};LUX.send=function(){LUX.cmd(["send"])};LUX.addData=function(a,b){LUX.cmd(["addData",a,b])};LUX_ae=[];window.addEventListener("error",function(a){LUX_ae.push(a)});LUX_al=[];if("function"===typeof(PerformanceObserver)&&"function"===typeof(PerformanceLongTaskTiming)){var LongTaskObserver=new PerformanceObserver(function(c){var b=c.getEntries();for(var a=0;a ({ - name: 'vuepress-plugin-speedcurve', - define() { - const id = params.id - - return { SPEEDCURVE_ID: id || false } - }, - enhanceAppFiles: path.resolve(__dirname, 'enhanceAppFiles.js'), -})