加入「拾编」写作台:文章 / 分类管理 + Markdown 上传

- 新增 studio 应用与 /manage/ 写作台
- 文章增删改查、状态/分类/标签、搜索筛选分页
- 分类增删改查,支持父分类
- 直接上传 .md(front matter)并创建文章,编辑页支持 Markdown 导入
- Post 增加 content_format,公开文章页支持 Markdown 渲染
- 复用拾匣密码解锁;首页页脚新增写作台入口
This commit is contained in:
2026-11-21 12:52:28 +08:00
parent d0f921ed27
commit 128dc20cd5
21 changed files with 2166 additions and 2 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ def post_detail(request, slug):
next_post = Post.objects.filter(id=published_ids[index + 1]).first()
# 阅读统计:先去掉 HTML 标签,再按非空白字符计数
plain_text = strip_tags(post.content or '')
plain_text = strip_tags(post.rendered_content or '')
char_count = len(re.sub(r'\s+', '', plain_text))
read_minutes = max(1, math.ceil(char_count / 400))