Skip to main content

render_post_fields

Function render_post_fields 

Source
pub(crate) async fn render_post_fields(
    content_md: &str,
    status_str: &str,
    cover_image: Option<&str>,
) -> Result<RenderedFields, AppError>
Expand description

渲染 Markdown 并派生全部度量字段(R4)。

收敛 create / update / MCP 写操作中重复的「spawn_blocking 渲染 → 7 步派生」: content_html、toc_html(空则 None)、auto_summary、status(from_str 回退 Draft)、 cover_image(trim 后非空则保留)、word_count、reading_time。