Appearance
Settings
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:
json
{
"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": {
"pageWithCommonLayout": "parent",
"componentsOnEveryPage": [
"#evenPageButton"
],
"includeDocuments": true,
"delay": 1000,
"icons": {
"blocks": {
"width": 150,
"enabled": true,
"mode": "view"
}
},
"thumbForEachTheme": false,
},
"clms": {
"spa": {
"keepOriginalFilename": [
"common/media/pdfs/my.pdf",
"**/*.pdf"
]
},
"aem": {
"xmlPath": "aem.xml"
},
},
"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 | The settings for taking the page screenshots when you export the site to the PDF format. |
screenshoter.pageWithCommonLayout | The ID of the page that has a screenshot of the common layout. By default, the screenshoter service takes the screenshot of the site common layout and components on the first page. The screenshots of other pages in the site include only the pages' content without components. |
screenshoter.componentsOnEveryPage | An array of CSS selectors. The screenshots of components are taken for the common layout on every page. For example, References. |
screenshoter.includeDocuments | A field that defines if the PDFs attached to the exported PDF. The default value is true. If set to false, the reference PDFs aren't added. |
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. |
screenshoter.thumbForEachTheme | If the value is set to false, the wiz thumbs command generates thumbnails only for the specific theme. If the value is set to true, the wiz thumbs command generates thumbnails for all themes except current to the directory specified in the thumbnails option in system settings. The current theme thumbnail is stored in the directory defined in the thumbnail option in system settings regardless of the thumbForEachTheme value. The default value is false. |
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 |
clms.aem.xmlPath | The path to the XML file with settings for the AEM build. The file is generated after the site is exported to AEM and includes tokens that are replaced with actual values. If the property isn't defined, the default file is used. |
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.
json
{
"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 theUser-agentfield inrobots.txt.allow—includes the pages the user agent can index. Enter/*to allow indexing for all pages. The default value is/*. Corresponds to theAllowfield inrobots.txt.disallow—includes the pages the user agent can't index. Enter/*to disallow indexing for all pages. Corresponds to theDisallowfield inrobots.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 theSitemapfield inrobots.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:
json
// ./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:
txt
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.xmlSitemap
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.
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 thesitemap.xmlfile. The default value ishttps://my.site.changefreq—frequency of the page refreshing. Corresponds to the<changefreq>tag insitemap.xml. The default value ismonthly. It can have the following values:alwayshourlydailyweeklymonthlyyearlynever
For more information about
changefreqvalues, see sitemap.org protocol.priority—the priority of the page relative to other pages. The range can vary from0.0to1.0. The default value is0.5. Corresponds to the<priority>tag insitemap.xmllastmod—the date when the page was last modified in the W3C date and time format. The default value is the date and time when the production build was generated. Corresponds to the<lastmod>tag insitemap.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:
json
// ./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:
xml
<!-- 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.