Update frontpage, improve meta tags

This commit is contained in:
discomrade 2021-09-28 08:11:41 +00:00
parent 1f9891006a
commit 76911be92a
2 changed files with 10 additions and 4 deletions

View File

@ -122,7 +122,10 @@
}
</style>
<title>{{ settings.title }}</title>
<meta name="description" content="{{ description }}">
<meta name="description" content="{{ metadescription|striptags }}">
{{ metaextra }}
</head>
<body>
{% include 'themes/categories/' ~ settings.file_sidebar %}

View File

@ -34,9 +34,10 @@
// Build homepage
public static function homepage($settings) {
global $config;
$description = 'Leftypol is a fun and enjoyable space where users can post anonymously.<br>' .
'We engage in both serious political discourse and less serious informal discussions ' .
'on various topics related to leftist thought.';
$description = "Leftypol is an imageboard where users can post anonymously.</br>We engage in both serious political discourse and informal discussion on various topics related to leftist thought. </br></br>They are... an interesting group of people - <i><a href='https://www.youtube.com/watch?v=rJvAxRCxxCg'>Senpai Wolff</a></i> ";
$metadescription = "Leftypol is an imageboard where users can post anonymously about both serious political discourse and informal discussion on various topics related to leftist thought.";
$metaextra = '<link rel="canonical" href="https://leftypol.org" />'.
'<script type="application/ld+json">{"@context": "https://schema.org","@type": "Organization","url": "https://leftypol.org","logo": "https://leftypol.org/static/leftypol_logo.png"}</script>';
$query = query("SELECT * FROM ``news`` ORDER BY `time` DESC") or error(db_error());
$news = $query->fetchAll(PDO::FETCH_ASSOC);
$stats = Categories::getPostStatistics($settings);
@ -46,6 +47,8 @@
'config' => $config,
'settings' => $settings,
'description' => $description,
'metadescription' => $metadescription,
'metaextra' => $metaextra,
'categories' => Categories::getCategories($config),
'news' => $news,
'stats' => $stats,