@ -23,6 +23,7 @@ class Sorting
$pages = (new Book('../content/pages'))->getContents();
$pages = (new Book('../content/pages'))->getContents();
foreach ($pages as $page) {
foreach ($pages as $page) {
$temp = [];
$temp = [];
if (isset($page['tags'])) {
$temp = explode(',', $page['tags']);
$temp = explode(',', $page['tags']);
foreach ($temp as $tag) {
foreach ($temp as $tag) {
$label = trim($tag);
$label = trim($tag);
@ -35,6 +36,7 @@ class Sorting
}
}
}
}
}
}
}
return self::$p_tags;
return self::$p_tags;
}
}
@ -43,6 +45,7 @@ class Sorting
{
{
$tagged = [];
$tagged = [];
foreach ($pages as $page) {
foreach ($pages as $page) {
if (isset($page['tags'])) {
if (strpos($page['tags'], $tag) !== false) {
if (strpos($page['tags'], $tag) !== false) {
array_push($tagged, [
array_push($tagged, [
'title' => $page['title'],
'title' => $page['title'],
@ -52,6 +55,7 @@ class Sorting
]);
]);
}
}
}
}
}
return $tagged;
return $tagged;
}
}
@ -124,9 +128,9 @@ class Sorting
'image' => $settings['global']['base_url'] . $settings['global']['background'],
'image' => $settings['global']['base_url'] . $settings['global']['background'],
'baseURL' => $settings['global']['base_url'],
'baseURL' => $settings['global']['base_url'],
];
];
$taglist = explode(',', $page['tags']);
$tags = [];
$tags = [];
if (isset($page['tags'])) {
$taglist = explode(',', $page['tags']);
foreach ($taglist as $tag) {
foreach ($taglist as $tag) {
$label = trim($tag);
$label = trim($tag);
array_push($tags, [
array_push($tags, [
@ -134,6 +138,7 @@ class Sorting
'slug' => StringTools::safeString($label),
'slug' => StringTools::safeString($label),
]);
]);
}
}
}
$meta = [
$meta = [
'who' => $page['author'],
'who' => $page['author'],