Discussion HTML: Add a canonical URL

Refs #358 and #1140.
This commit is contained in:
Franz Liedke 2018-07-16 01:43:06 +02:00
parent 3d845d5730
commit 551ca23267
No known key found for this signature in database
GPG Key ID: 9A0231A879B055F4

View File

@ -90,6 +90,7 @@ class Discussion implements ContentInterface
}
$document->title = $apiDocument->data->attributes->title;
$document->canonicalUrl = $url([]);
$document->content = $this->view->make('flarum.forum::frontend.content.discussion', compact('apiDocument', 'page', 'getResource', 'posts', 'url'));
$document->payload['apiDocument'] = $apiDocument;