Skip to content

Commit 55becb7

Browse files
authored
Merge pull request #9 from ericalli/optional-configs
Add optional configs, resolves issue #3
2 parents 2325c40 + d5fdbbe commit 55becb7

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

config/site.config.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ const config = {
1717
// Your website's URL, used for sitemap
1818
site_url: 'http://staticsiteboilerplate.com',
1919

20-
// Google Analytics tracking ID
21-
googleAnalyticsUA: 'UA-XXXXX-Y',
20+
// Google Analytics tracking ID (leave blank to disable)
21+
googleAnalyticsUA: '',
22+
23+
// The viewport meta tag added to your HTML page's <head> tag
24+
viewport: 'width=device-width,minimum-scale=1,maximum-scale=1',
2225

2326
// Source file for favicon generation. 512x512px recommended.
2427
favicon: path.join(ROOT, '/src/images/favicon.png'),

config/webpack.plugins.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
1313
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
1414
const RobotstxtPlugin = require('robotstxt-webpack-plugin').default;
1515
const SitemapPlugin = require('sitemap-webpack-plugin').default;
16-
// const GoogleAnalyticsPlugin = require('html-webpack-google-analytics-plugin');
1716

1817
const config = require('./site.config');
1918

@@ -67,7 +66,7 @@ const generateHTMLPlugins = () => glob.sync('./src/**/*.html').map((dir) => {
6766
filename,
6867
template: path.join(config.root, config.paths.src, filename),
6968
meta: {
70-
viewport: 'width=device-width,minimum-scale=1,maximum-scale=1,user-scalable=no',
69+
viewport: config.viewport,
7170
},
7271
});
7372
});
@@ -139,7 +138,7 @@ module.exports = [
139138
config.env === 'production' && optimizeCss,
140139
config.env === 'production' && robots,
141140
config.env === 'production' && sitemap,
142-
google,
141+
config.googleAnalyticsUA && google,
143142
webpackBar,
144143
config.env === 'development' && hmr,
145144
].filter(Boolean);

0 commit comments

Comments
 (0)