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:
+8
-1
@@ -65,7 +65,7 @@ php artisan sablog:import \
|
||||
|
||||
- 伪静态:`/show-12-1.html` → 新文章页;`/category-3-1.html` → 新分类页;`/archives-202008-1.html` → 新归档
|
||||
- 查询串:`/?action=show&id=12`、`/?action=search&keyword=x`、`/?action=tags&id=1` …全部映射
|
||||
- 稳定路径:`/rss.xml`、`/sitemap.xml`、`/robots.txt` 保持原样
|
||||
- 稳定路径:`/rss.xml`、`/sitemap.xml`、`/robots.txt`、`/llms.txt` 保持原样
|
||||
- 老入口:`attachment.php?id=` → 301 到 S3/本地媒体地址;`tburl.php`/`trackback.php` → 410
|
||||
|
||||
## 附件上 S3
|
||||
@@ -86,8 +86,15 @@ php artisan attachments:sync-s3 --legacy-dir=... --force
|
||||
php artisan content:convert --all # 全部 HTML 文章转 Markdown
|
||||
php artisan content:convert 12 # 单篇
|
||||
php artisan content:convert --all --dry-run # 先预览
|
||||
|
||||
# 清洗已导入正文:字面 、SyntaxHighlighter、docker 分行 div
|
||||
php artisan sablog:fix-content --all
|
||||
php artisan sablog:fix-content 3156
|
||||
php artisan sablog:fix-content --all --dry-run
|
||||
```
|
||||
|
||||
渲染时也会做同样的清洗,所以不跑修复命令,前台也能先看起来正常。`content:convert` 和 `--convert-markdown` 会先清洗再转 Markdown。
|
||||
|
||||
## 幂等与重跑
|
||||
|
||||
- 导入按**原始 ID** `updateOrInsert`:重复执行不会产生重复数据,只会覆盖更新
|
||||
|
||||
Reference in New Issue
Block a user