%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/specpages-backup/node_modules/hexo/lib/plugins/generator/
Upload File :
Create Path :
Current File : /www/specpages-backup/node_modules/hexo/lib/plugins/generator/page.js

'use strict';

function pageGenerator(locals) {
  return locals.pages.map(page => {
    const { path, layout } = page;

    if (!layout || layout === 'false' || layout === 'off') {
      return {
        path,
        data: page.content
      };
    }

    const layouts = ['page', 'post', 'index'];
    if (layout !== 'page') layouts.unshift(layout);

    page.__page = true;

    return {
      path,
      layout: layouts,
      data: page
    };
  });
}

module.exports = pageGenerator;

Zerion Mini Shell 1.0