Subdomain support

This tutorial was contributed by Deo Kumar

Subdomain setup

  • The first thing as you need to do is create a subdomain , Contact Quintype Support for creating a list of subdomain.

  • Configure list of subdomains in in Bold and fill all the necessary fields like name, domain url , section mapping, menu group, and home collection, etc. Shown in the below picture. You may contact Quintype Support team to setup if you don’t have access.

Bold Secret mode

  • As soon as you configure the subdomain in Bold, you should able to see the subdomain slug in the config API of sketches. ex -

  • Now the last step is to map your subdomains with the app, go to publisher.yml file, and change subdomain with your actual subdomain URL.

In our config/publisher.yml we have a domain_mapping field you need to change it with the actual subdomain name

domain_mapping: ace-hindi

That’s it. Now your subdomain is ready and, you should able to see the subdomain pages.

Render different fonts for subdomains

Another good feature of malibu is that you can use different types of font for different domains.

  1. Goto load-data.js file and add domainSlug: domainSlug of _loadData() function

Open app/server/load-data.js

return _loadData().then(data => {
    return {
      domainSlug: domainSlug,
      httpStatusCode: data.httpStatusCode || 200,
      pageType: data.pageType || pageType,
      data: Object.assign({}, data, {
        navigationMenu: getNavigationMenuArray(, config.sections)
      config: pick(config.asJson(), WHITELIST_CONFIG_KEYS)

  1. Now goto render-layout.js file and pass domainSlug from the state so that you can access domainSlug into the layout.ejs for font changes.

Open app/server/handlers/render-layout.js

export function renderLayout(res, params) {
  const chunk = ? null : allChunks[getChunkName(params.pageType)];
  const {gaId} = getConfig(;

        assetPath: assetPath,
        content: "",
        cssContent: cssContent,
        fontJsContent: fontJsContent,
        domainSlug: get(, ["config", "domainSlug"], ""),

  1. Now the last step is to change your font on basis of domainSlug, for that you need to open the layout.ejs file and add domainSlug check-in head of the page to render different types of font.

Open views/pages/layout.ejs


<% if(domainSlug === 'ace-hindi') { %>
    @font-face {
      font-family: 'Noto Sans';
      font-style: normal;
      font-weight: 400;
      font-display: swap;
      src: local('Noto Sans'), local('NotoSans'), url( format('woff2');
      unicode-range: U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB;
<% } else { %>
// default
    @font-face {
      src:url("") format("woff2"),url("") format("woff"),url("") format("opentype");
<% } %>