add meta keywords support

This commit is contained in:
ghost 2023-10-17 03:24:24 +03:00
parent 306ccb6078
commit 2524a30476
3 changed files with 9 additions and 0 deletions

View File

@ -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(),

View File

@ -3,6 +3,9 @@
<head>
<meta charset="UTF-8" />
<title>{% block title %}{{ name }}{% endblock %}</title>
{% block keywords %}
<meta name="keywords" content="yggverse,yggtracker,yggdrasil,bittorrent,magnet,tracker" />
{% endblock %}
{% block stylesheets %}
<link href="{{ asset('asset/' ~ theme ~ '/css/framework.css') }}?{{ version }}" rel="stylesheet" />
<link href="{{ asset('asset/' ~ theme ~ '/css/common.css') }}?{{ version }}" rel="stylesheet" />

View File

@ -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 %}
<meta name="keywords" content="{{ torrent.keywords | join(',') }}" />
{% endif %}
{% endblock %}
{% block main_content %}
<div class="padding-24-px margin-y-8-px border-radius-3-px background-color-night">
<h1 class="display-block text-center margin-b-16-px">