public function document($projectSlug, $ref = null, $path = '')
    {
        $project = $this->factory->getProject($projectSlug);

        if (is_null($ref)) {
            $ref = $project->getDefaultRef();
        }
        $project->setRef($ref);

        $document   = $project->getDocument($path);
        $content    = $document->render();
        $breadcrumb = $document->getBreadcrumb();


        $this->view->composer($document->attr('view'), $this->factory->config('projects_menus_view_composer'));

        return  $this->view->make($document->attr('view'), compact('project', 'document', 'content', 'breadcrumb'));
    }