src/Step/ConvertPages.php
public function convertPage(Page $page, $format = 'yaml')
    {
        // converts frontmatter
        if ($page->getFrontmatter()) {
            try {
                $variables = Converter::convertFrontmatter($page->getFrontmatter(), $format);
            } catch (Exception $e) {
                $message = sprintf("Unable to convert frontmatter of '%s': %s", $page->getId(), $e->getMessage());
                call_user_func_array($this->phpoole->getMessageCb(), ['CONVERT_ERROR', $message]);

                return false;
            }
            $page->setVariables($variables);
        }

        // converts body
        $html = Converter::convertBody($page->getBody());
        $page->setHtml($html);

        return $page;
    }
public function convertPage(Page $page, $format = 'yaml')
    {
        // converts frontmatter
        if ($page->getFrontmatter()) {
            try {
                $variables = Converter::convertFrontmatter($page->getFrontmatter(), $format);
            } catch (Exception $e) {
                $message = sprintf("Unable to convert frontmatter of '%s': %s", $page->getId(), $e->getMessage());
                call_user_func_array($this->phpoole->getMessageCb(), ['CONVERT_ERROR', $message]);

                return false;
            }
            $page->setVariables($variables);
        }

        // converts body
        $html = Converter::convertBody($page->getBody());
        $page->setHtml($html);

        return $page;
    }
Converts page content:
- Yaml frontmatter to PHP array
- Markdown body to HTML.

@param Page   $page
@param string $format

@return Page