From 2524a30476377534a742950b796fdbd69d4879ed Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 17 Oct 2023 03:24:24 +0300 Subject: [PATCH] add meta keywords support --- src/Controller/TorrentController.php | 1 + templates/default/layout.html.twig | 3 +++ templates/default/torrent/info.html.twig | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/src/Controller/TorrentController.php b/src/Controller/TorrentController.php index 1b8e77a..e5865dd 100644 --- a/src/Controller/TorrentController.php +++ b/src/Controller/TorrentController.php @@ -125,6 +125,7 @@ class TorrentController extends AbstractController 'peers' => (int) $torrent->getPeers(), 'leechers' => (int) $torrent->getLeechers(), ], + 'keywords' => $torrent->getKeywords(), 'locales' => $torrent->getLocales(), 'sensitive' => $torrent->isSensitive(), 'approved' => $torrent->isApproved(), diff --git a/templates/default/layout.html.twig b/templates/default/layout.html.twig index b6c1775..a9eb79e 100644 --- a/templates/default/layout.html.twig +++ b/templates/default/layout.html.twig @@ -3,6 +3,9 @@ {% block title %}{{ name }}{% endblock %} + {% block keywords %} + + {% endblock %} {% block stylesheets %} diff --git a/templates/default/torrent/info.html.twig b/templates/default/torrent/info.html.twig index a7951b2..ecd174b 100644 --- a/templates/default/torrent/info.html.twig +++ b/templates/default/torrent/info.html.twig @@ -21,6 +21,11 @@ {% from _self import recursive_file_tree %} {% extends 'default/layout.html.twig' %} {% block title %}{{ file.name }} - {{ 'Torrent' | trans }} #{{ torrent.id }}{% if pagination.page > 1 %} - {{ 'Page' | trans }} {{ pagination.page }}{% endif %} - {{ name }}{% endblock %} +{% block keywords %} + {% if torrent.keywords %} + + {% endif %} +{% endblock %} {% block main_content %}