code: function publishSiteMaps () {
      var path = 'sitemap.xml';
  
      return publishRobotsTxt ()
          .then(function () {
              return fs.statAsync(path);
          })
          .then(function (pStat) {
              if (pStat.isFile()) {
                  // file exists; throw Error to proceed with creating of sitemaps for posts and tags
                  return publishPostsSiteMap()
                      .then(function () {
                          return publishTagsSiteMap();
                      })
                      .catch(log.error);
              }
              else {
                  // create sitemap.xml file
                  throw new Error();
              }
          })
          .catch(function () {
              var sitemap = sm.createSitemap ({
                  hostname: config.siteUrl,
                  cacheTime: 600000,        // 600 sec - cache purge period
                  urls: [{
                          url: '/sitemap-posts.xml',
                          changeFreq: 'weekly',
                          priority: 0.8,
                          lastmodrealtime: true
                      },
                      {
                          url: '/sitemap-tags.xml',
                          changeFreq: 'weekly',
                          priority: 0.8,
                          lastmodrealtime: true
                      }]
              });
  
              return fs
                  .openAsync(path, 'w')
                  .then(function () {
                      return fs
                          .writeFileAsync(path, sitemap.toString())
                          .then(function () {
                              // file exists; throw Error to proceed with creating of sitemaps for posts and tags
                              return publishPostsSiteMap().then(function () {
                                  return publishTagsSiteMap().catch(log.error);
                              });
                          })
                          .catch(log.error);
                  })
                  .catch(log.error);
          });
  }
docs: Creates a robots.txt file if it does not exists, then a sitemap.xml if it does not exist
  and then creates (or overwrites existing) sitemap-posts.xml and sitemap-tags.xml
  @returns {*}