Skip to content

Commit

Permalink
Move viewport meta tag to site configs
Browse files Browse the repository at this point in the history
  • Loading branch information
ericalli committed Jan 12, 2019
1 parent 44826b8 commit d788bfc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions config/site.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ const config = {
// Google Analytics tracking ID (leave blank to disable)
googleAnalyticsUA: '',

// The viewport meta tag added to you 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
3 changes: 1 addition & 2 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

0 comments on commit d788bfc

Please sign in to comment.