From f1b0770740f65e50189cacaa3308a5aaa8be8560 Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Fri, 21 Feb 2020 22:10:07 +0000 Subject: Remove un-need stuff --- config.php | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'config.php') diff --git a/config.php b/config.php index 6ec7672..e357577 100644 --- a/config.php +++ b/config.php @@ -36,35 +36,4 @@ return [ 'allCategories' => function ($page, $allPosts) { return $allPosts->pluck('categories')->flatten()->unique(); }, - - 'getExcerpt' => function ($page, $length = 255) { - if ($page->excerpt) { - return $page->excerpt; - } - - $content = preg_split('//m', $page->getContent(), 2); - $cleaned = trim( - strip_tags( - preg_replace(['/
[\w\W]*?<\/pre>/', '/[\w\W]*?<\/h\d>/'], '', $content[0]),
-                ''
-            )
-        );
-
-        if (count($content) > 1) {
-            return $content[0];
-        }
-
-        $truncated = substr($cleaned, 0, $length);
-
-        if (substr_count($truncated, '') > substr_count($truncated, '')) {
-            $truncated .= '';
-        }
-
-        return strlen($cleaned) > $length
-            ? preg_replace('/\s+?(\S+)?$/', '', $truncated) . '...'
-            : $cleaned;
-    },
-    'isActive' => function ($page, $path) {
-        return Str::endsWith(trimPath($page->getPath()), trimPath($path));
-    },
 ];
-- 
cgit v1.2.3-13-gbd6f