Skip to content

Commit 9efdf95

Browse files
authored
Merge pull request #12 from rollup-umd/dev
feat(themeColor): added option themeColor for adding meta theme color
2 parents 4175d3f + 5d00f35 commit 9efdf95

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/createConfig.js

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export const defaultOptions = {
3030
favicons: {},
3131
head: null,
3232
disableAutoConf: false,
33+
themeColor: null,
3334
};
3435

3536
export const webpackMerge = merge;
@@ -160,6 +161,7 @@ function retrieveComponentsApiPath(defaultStyleGuidePath, defaultWrapperPath, pk
160161
* @param {string} [options.favicons={}] options.favicons - Object with favicon name and href value for favicon
161162
* @param {string} [options.head=null] options.head - This will be injected at the end of <head /> tag
162163
* @param {boolean} [options.disableAutoConf=false] option.disableAutoConf - Disable auto configuration of layout package
164+
* @param {string} [options.themeColor=null] option.themeColor - This will add a meta with name `theme-color` and content using color in opts.themeColor
163165
* @example
164166
* // Choose manually a layout package and expand example by default
165167
* const { createConfig } = require('$PACKAGE_NAME');
@@ -452,6 +454,7 @@ export function createConfig(config = {}, options = {}) {
452454
${pkg.private === false ? '<meta name="robots" content="nofollow"/>' : '<meta name="robots" content="noindex, nofollow"/>'/* false means release in private, true means never released */}
453455
${pkg.name !== thisPkg.name ? `<meta name="${thisPkg.name}-version" content="${thisPkg.version}">\n<meta name="version" content="${pkg.version}">` : `<meta name="version" content="${pkg.version}">`}
454456
${favicon ? `<link rel="icon" type="image/x-icon" href="${favicons[favicon]}">` : ''}
457+
${opts.themeColor ? `<meta name="theme-color" content="${opts.themeColor}" />` : ''}
455458
${opts.head ? opts.head : ''}
456459
<title>${title}</title>
457460
${generateCSSReferences(css, publicPath)}

0 commit comments

Comments
 (0)