src/Generator/PagesFromConfig.php
public function generate(PageCollection $pageCollection, \Closure $messageCallback)
    {
        $generatedPages = new PageCollection();

        $fmPages = $this->config->get('site.fmpages');
        foreach ($fmPages as $file => $frontmatter) {
            $page = (new Page())
                ->setId(Page::urlize(sprintf('%s', $file)))
                ->setPathname(Page::urlize(sprintf('%s', $file)));
            $page->setVariables($frontmatter);
            if (!empty($frontmatter['layout'])) {
                $page->setLayout($frontmatter['layout']);
            }
            if (!empty($frontmatter['permalink'])) {
                $page->setPermalink($frontmatter['permalink']);
            }
            $generatedPages->add($page);
        }

        return $generatedPages;
    }
public function generate(PageCollection $pageCollection, \Closure $messageCallback)
    {
        $generatedPages = new PageCollection();

        $fmPages = $this->config->get('site.fmpages');
        foreach ($fmPages as $file => $frontmatter) {
            $page = (new Page())
                ->setId(Page::urlize(sprintf('%s', $file)))
                ->setPathname(Page::urlize(sprintf('%s', $file)));
            $page->setVariables($frontmatter);
            if (!empty($frontmatter['layout'])) {
                $page->setLayout($frontmatter['layout']);
            }
            if (!empty($frontmatter['permalink'])) {
                $page->setPermalink($frontmatter['permalink']);
            }
            $generatedPages->add($page);
        }

        return $generatedPages;
    }
{@inheritdoc}