feat: restore sablog browse modes and clean imported HTML
Keep the public site readable after import (nbsp, highlighter, wrapping code, compact pager) and finish the admin extras already in this tree: sticky levels, preview, page cache, and live llms.txt. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace App\Filament\Widgets;
|
||||
|
||||
use App\Blog\Support\PageCacheMiddleware;
|
||||
use App\Filament\Pages\PageCache;
|
||||
use App\Models\Comment;
|
||||
use App\Models\Post;
|
||||
use App\Models\User;
|
||||
@@ -17,7 +18,7 @@ class BlogStats extends BaseWidget
|
||||
|
||||
protected function getStats(): array
|
||||
{
|
||||
$cache = \App\Blog\Support\PageCacheMiddleware::stats();
|
||||
$cache = PageCacheMiddleware::stats();
|
||||
|
||||
return [
|
||||
Stat::make('文章', Post::published()->count())
|
||||
@@ -30,6 +31,7 @@ class BlogStats extends BaseWidget
|
||||
->icon('heroicon-o-users'),
|
||||
Stat::make('页面缓存', $cache['count'].' 条')
|
||||
->description('命中率 '.$cache['rate'].'%(命中 '.$cache['hits'].' / 未命中 '.$cache['misses'].',按日滚动)')
|
||||
->url(PageCache::getUrl())
|
||||
->icon('heroicon-o-bolt'),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user