lib/services/metadata.js
function createPage(ref, user) {
  const NOW = new Date().toISOString(),
    users = [userOrRobot(user)],
    meta = {
      createdAt: NOW,
      archived: false,
      published: false,
      publishTime: null,
      updateTime: null,
      urlHistory: [],
      firstPublishTime: null,
      url: '',
      title: '',
      authors: [],
      users,
      history: [{action: 'create', timestamp: NOW, users }],
      siteSlug: sitesService.getSiteFromPrefix(ref.substring(0, ref.indexOf('/_pages'))).slug
    };

  return putMeta(ref, meta);
}
function createPage(ref, user) {
  const NOW = new Date().toISOString(),
    users = [userOrRobot(user)],
    meta = {
      createdAt: NOW,
      archived: false,
      published: false,
      publishTime: null,
      updateTime: null,
      urlHistory: [],
      firstPublishTime: null,
      url: '',
      title: '',
      authors: [],
      users,
      history: [{action: 'create', timestamp: NOW, users }],
      siteSlug: sitesService.getSiteFromPrefix(ref.substring(0, ref.indexOf('/_pages'))).slug
    };

  return putMeta(ref, meta);
}
function createPage ( ref , user ) { const NOW = new Date ( ) . toISOString ( ) , users = [ userOrRobot ( user ) ] , meta = { createdAt : NOW , archived : false , published : false , publishTime : null , updateTime : null , urlHistory : [ ] , firstPublishTime : null , url : '' , title : '' , authors : [ ] , users , history : [ { action : 'create' , timestamp : NOW , users } ] , siteSlug : sitesService . getSiteFromPrefix ( ref . substring ( 0 , ref . indexOf ( '/_pages' ) ) ) . slug } ; return putMeta ( ref , meta ) ; }
Create the initial meta object
for the page

@param {String} ref
@param {Object|Underfined} user
@returns {Promise}
Create the initial meta object for the page