Skip to main content
eWizard.js: Site settings

Learn more about the settings of the scaffolding template

eWizard Team avatar
Written by eWizard Team
Updated over a year ago

The settings.json file in the project root directory stores the site template settings. When you initialize the site scaffolding template, this is the default configuration of the settings.json file:

{ 
"name": "site-settings-json",
"id":"505de083-d0bc-4892-9aa0-126a1b7205b6",
"localization":{
"current":"eng",
"original":"",
"langs":[
"eng"
]
},
"browserslist": ["last 2 versions"],
"uncss": {
"ignore": [
"/\\.footer-product-logo/",
"/\\.item-text/",
"/\\.m-center/"
]
},
"screenshoter": {
"delay": 1000,
"icons": {
"blocks": {
"width": 150,
"enabled": true,
"mode": "view"
}
}
},
"clms": {
"spa": {
"keepOriginalFilename": [
"common/media/pdfs/my.pdf",
"**/*.pdf"
]
}
},
"navigation": {
"router": {
"mode": "hash"
}
},
"seo": {
"robots": {
"userAgents": [
{
"userAgent": "*",
"allow": "/",
"disallow": "/search",
"sitemap": "https://www.example.com/sitemap.xml"
},
{
"userAgent": [
"Googlebot-Image",
"Bingbot",
"Mediapartners-Google"
],
"allow": [
"/",
"/search"
],
"disallow": "/detail"
}
],
},
"sitemap": {
"changefreq": "always",
"priority": 1.0
}
}
}

Field

Description

name

The site template name.

id

The unique ID of the created site.

localization

Information about the current localization and available languages of the site template.

browserslist

Defines the supported browsers for demonstrating your site. This configuration is applicable in prefixing the CSS rules and polyfilling JS. The exporting engine applies these settings only when building the site for the target CLM app. For more information, see the Browserslist configuration syntax.

uncss

Defines if the UnCSS tool is used in your site project. For more information, see UnCSS removal from site builds.

screenshoter.delay

The delay with which the icon is generated in milliseconds. For more information, see Set delay for generating a screenshot.

screenshoter.icons.blocks.enabled

A boolean property that defines if the automatic generation of block icons is on. The default value is false. For more information, see Generate icons for blocks.

screenshoter.icons.blocks.width

Defines the width of the generated block icons in pixels. The property works if the screenshoter.icons.blocks.enabled is true. For more information, see Set generated icon width.

screenshoter.icons.blocks.mode

Defines if the block icons are generated as in the eWizard Editor PREVIEW or EDIT mode. The default value is view. The property works if the screenshoter.icons.blocks.enabled is true. For more information, see Icons for view/edit mode.

clms.spa.keepOriginalFilename

Enter paths to files or file formats you want to keep the original name for instead of generating a unique name. For more information, see Keep original filename in a site build.

navigation.router.mode

Includes the mode settings for the Vue router in multipage sites.

seo

Includes the SEO settings for multipage sites.

seo.robots

Includes the SEO settings for the robots.txt file. For more information, read robots.txt.

seo.sitemap

Includes the sitemap.xml settings for user agents.

It is highly recommended to configure seo.robots.userAgents.allow and seo.robots.userAgents.disallow in the pages.json file to prevent issues when editing the file in eWizard Editor.

robots.txt

The robots.txt file includes settings for web crawlers that index websites.

You can configure the settings for the robots.txt file in the settings.json file.

The hideForSearchEngines option in pages.json has priority over the allow and disallow options in settings.json. If the same page is added to the allow object of settings.json and has the hideForSearchEngines as true in pages.json, the page is added to the Disallow object of the robots.txt file.

{ "seo": { "robots": { "userAgents": [ { "userAgent": "*", "allow": "/", "disallow": "/search", "sitemap": "https://www.example.com/sitemap.xml" }, { "userAgent": [ "Googlebot-Image", "Bingbot", "Mediapartners-Google" ], "allow": [ "/", "/search" ], "disallow": "/detail" } ], } } }

You can configure the following fields for the robots.txt file:

  • userAgent—the user agent you apply the instructions to. Enter * to apply the instruction to all user agents. The default value is *. Corresponds to the User-agent field in robots.txt.

  • allow—includes the pages the user agent can index. Enter /* to allow indexing for all pages. The default value is /*. Corresponds to the Allow field in robots.txt.

  • disallow—includes the pages the user agent can't index. Enter /* to disallow indexing for all pages. Corresponds to the Disallow field in robots.txt.

  • sitemap—the path to the sitemap of the multiple page site. The default value is generated based on the deployed domain of the site. For example, https://www.viseven.com/sitemap.xml. Corresponds to the Sitemap field in robots.txt.

After running a production build, the robots.txt file appears in the resulting build. The file content depends on the settings in settings.json and pages.json.

For example, when generating a build of a site with the following settings:

// ./settings.json { "seo": { "robots": { "userAgents": [ { "userAgent": "*", "allow": "/", "disallow": "/search" }, { "userAgent": [ "Googlebot-Image", "Bingbot", "Mediapartners-Google" ], "allow": [ "/", "/search" ], "disallow": "/detail" } ], "sitemap": "https://www.example.com/sitemap.xml" } } }

The following robots.txt file is generated:

User-agent: * Allow: / Disallow: /search User-agent: Googlebot-Image Allow: / Allow: /search Disallow: /detail User-agent: Bingbot Allow: / Allow: /search Disallow: /detail User-agent: Mediapartners-Google Allow: / Allow: /search Disallow: /detail Sitemap: https://www.example.com/sitemap.xml

Sitemap

The sitemap.xml file includes the metadata about the site pages for user agents.

You can configure the settings for the sitemap in settings.json and pages.json. It's useful to generate sitemap settings for the whole site in settings.json and apply settings for specific pages in pages.json.

The sitemap settings in pages.json have priority over settings from settings.json. If the same page has sitemap settings configured in both pages.json and settings.json, the settings from pages.json apply.

You can configure the following sitemap settings in settings.json.

// ./settings.json { "seo": { "sitemap": { "hostname": "https://my.site", "changefreq": "always", "priority": 1.0, "lastmod": "2023-05-15T10:30:00+00:00", } } }
  • hostname—the URL of the site domain. Corresponds to the <loc> tag in the sitemap.xml file. The default value is https://my.site.

  • changefreq—frequency of the page refreshing. Corresponds to the <changefreq> tag in sitemap.xml. The default value is monthly. It can have the following values:

    • always

    • hourly

    • daily

    • weekly

    • monthly

    • yearly

    • never

    For more information about changefreq values, see sitemap.org protocol (opens new window).

  • priority—the priority of the page relative to other pages. The range can vary from 0.0 to 1.0. The default value is 0.5. Corresponds to the <priority> tag in sitemap.xml

  • lastmod—the date when the page was last modified in the W3C date and time format (opens new window). The default value is the date and time when the production build was generated. Corresponds to the <lastmod> tag in sitemap.xml.

After running a production build, the sitemap.xml is generated based on the settings.json and pages.json configurations.

For example, for the settings.json file with the following settings:

// ./settings.json { "seo": { "sitemap": { "hostname": "https://www.example.com", "changefreq": "always", "priority": 1.0, "lastmod": "2023-05-15T10:30:00+00:00", } } }

The following sitemap.xml is generated:

<!-- sitemap.xml --> <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>https://www.example.com</loc> <lastmod>2023-05-15T10:30:00+00:00</lastmod> <changefreq>always</changefreq> <priority>1.0</priority> </url> </urlset>

For more information about settings in other template types, see Configuration.

Did this answer your question?