diff --git a/config/site.config.js b/config/site.config.js index 9c21df1..4bbac4c 100644 --- a/config/site.config.js +++ b/config/site.config.js @@ -17,8 +17,11 @@ const config = { // Your website's URL, used for sitemap site_url: 'http://staticsiteboilerplate.com', - // Google Analytics tracking ID - googleAnalyticsUA: 'UA-XXXXX-Y', + // Google Analytics tracking ID (leave blank to disable) + googleAnalyticsUA: '', + + // The viewport meta tag added to your HTML page's tag + viewport: 'width=device-width,minimum-scale=1,maximum-scale=1', // Source file for favicon generation. 512x512px recommended. favicon: path.join(ROOT, '/src/images/favicon.png'), diff --git a/config/webpack.plugins.js b/config/webpack.plugins.js index a8bcc86..b732dc5 100644 --- a/config/webpack.plugins.js +++ b/config/webpack.plugins.js @@ -13,7 +13,6 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin'); const RobotstxtPlugin = require('robotstxt-webpack-plugin').default; const SitemapPlugin = require('sitemap-webpack-plugin').default; -// const GoogleAnalyticsPlugin = require('html-webpack-google-analytics-plugin'); const config = require('./site.config'); @@ -67,7 +66,7 @@ const generateHTMLPlugins = () => glob.sync('./src/**/*.html').map((dir) => { filename, template: path.join(config.root, config.paths.src, filename), meta: { - viewport: 'width=device-width,minimum-scale=1,maximum-scale=1,user-scalable=no', + viewport: config.viewport, }, }); }); @@ -139,7 +138,7 @@ module.exports = [ config.env === 'production' && optimizeCss, config.env === 'production' && robots, config.env === 'production' && sitemap, - google, + config.googleAnalyticsUA && google, webpackBar, config.env === 'development' && hmr, ].filter(Boolean);