aboutsummaryrefslogtreecommitdiff
path: root/_site/latest/index.php
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-08-04 16:56:12 +0200
committerMinteck <nekostarfan@gmail.com>2021-08-04 16:56:12 +0200
commit896fa7c96856142f844d958b049d5432f511641c (patch)
treed8bbbe327939ade9bd13276c6b4c6105adf95323 /_site/latest/index.php
parent7df2fb3f5ee0ac5bd89e127c86ad0c2d6de126d1 (diff)
downloadunchainedtech-896fa7c96856142f844d958b049d5432f511641c.tar.gz
unchainedtech-896fa7c96856142f844d958b049d5432f511641c.tar.bz2
unchainedtech-896fa7c96856142f844d958b049d5432f511641c.zip
v2.0
Diffstat (limited to '_site/latest/index.php')
-rw-r--r--_site/latest/index.php19
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