protected function addHtmlExtensions(Application $app)
    {
        $html = $app->make('html');

        $html->macro('title', function ($title = null) use ($html) {
            $builder = new Title($html, \memorize('site.name'), [
                'site' => \get_meta('html::title.format.site', '{site.name} (Page {page.number})'),
                'page' => \get_meta('html::title.format.page', '{page.title} &mdash; {site.name}'),
            ]);

            return $builder->title($title ?: \trim(\get_meta('title', '')));
        });
    }