From 97a105e37896c99eb622c832e5f337386c95bf26 Mon Sep 17 00:00:00 2001 From: danpros Date: Sun, 3 Mar 2024 09:06:59 +0700 Subject: [PATCH] Update functions.php --- system/includes/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/includes/functions.php b/system/includes/functions.php index b494f14..edaefbd 100644 --- a/system/includes/functions.php +++ b/system/includes/functions.php @@ -398,6 +398,7 @@ function get_posts($posts, $page = 1, $perpage = 0) $auto = config('toc.automatic'); $counter = config('views.counter'); $caption = config('fig.captions'); + $permalink = config('permalink.type'); if ($counter == 'true') { $viewsFile = "content/data/views.json"; @@ -463,7 +464,7 @@ function get_posts($posts, $page = 1, $perpage = 0) // The archive per day $post->archive = site_url() . 'archive/' . date('Y-m', $post->date); - if (config('permalink.type') == 'post') { + if ($permalink == 'post') { $post->url = site_url() . 'post/' . str_replace('.md', '', $arr[2]); } else { $post->url = site_url() . date('Y/m', $post->date) . '/' . str_replace('.md', '', $arr[2]);