diff options
Diffstat (limited to '_site/latest')
-rw-r--r-- | _site/latest/index.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/_site/latest/index.php b/_site/latest/index.php new file mode 100644 index 0000000..54e631e --- /dev/null +++ b/_site/latest/index.php @@ -0,0 +1,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();
\ No newline at end of file |