aboutsummaryrefslogtreecommitdiff
path: root/_site/latest/index.php
blob: 54e631efbf9ca5975351f6d39ea6ac0f88bdb1e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/markdown.php";
$Parsedown = new Parsedown();

require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/articles/getlist.php";

$list = getArticlesList();
$latest = null;

foreach ($list as $article) {
    if (!$article["admin"]) {
        $latest = $article;
        break;
    }
}

header("Location: /article/{$latest["id"]}");
die();