Skip to content

Commit

Permalink
Merge pull request #9 from ericalli/optional-configs
Browse files Browse the repository at this point in the history
Add optional configs, resolves issue #3
  • Loading branch information
ericalli committed Jan 12, 2019
2 parents 2325c40 + d5fdbbe commit 55becb7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 5 additions & 2 deletions config/site.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <head> 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'),
Expand Down
5 changes: 2 additions & 3 deletions config/webpack.plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -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,
},
});
});
Expand Down Expand Up @@ -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);

0 comments on commit 55becb7

Please sign in to comment.