Browse Source

Update functions.php

pull/698/head
danpros 1 year ago
parent
commit
97a105e378
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      system/includes/functions.php

+ 2
- 1
system/includes/functions.php View File

@ -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]);


Loading…
Cancel
Save