code: function(cfg) {
              var sharingLink = _.get(cfg, 'links.sharing', {});
              cfg.pluginsConfig.sharing = _.defaults(cfg.pluginsConfig.sharing || {}, {});
  
              _.each(sharingLink, function(enabled, type) {
                  if (enabled != false) return;
  
                  if (type == 'all') cfg.pluginsConfig.sharing[type] = [];
                  else cfg.pluginsConfig.sharing[type] = false;
              });
  
              return cfg;
          }
docs: Compatibility layer for gitbook < 2.5.0