docs: function (structure, locals) {
        if (typeof structure !== 'string') {
          locals = structure;
          structure = null;
        }
  
        var self = this;
  
        var data = {};
        lazy.extend(data, this);
        lazy.extend(data, this.parsePath());
        lazy.extend(data, this.context(locals));
        this.data.dest = this.data.dest || {};
  
        var opts = lazy.get(data, 'permalinks') || {};
        lazy.extend(opts, this.options.permalinks || {});
  
        if (typeof structure !== 'string') {
          structure = opts.structure || ':path';
        }
  
        return structure.replace(/:(\w+)(?:\((.*)\))?/g, function (m, param, prop) {
          var res = data[param] || param;
          if (typeof res === 'function' && prop) {
            return res.call(data, prop);
          }
  
          self.data.dest = res;
          return res;
        });
      }