Add post title
This commit is contained in:
@@ -171,6 +171,17 @@ fn process_tag(
|
||||
Ok(post.html_content.clone())
|
||||
}
|
||||
|
||||
"title" => {
|
||||
let post_name = current_post
|
||||
.ok_or_else(|| "title tag used outside of post context".to_string())?;
|
||||
|
||||
let post = post_manager
|
||||
.get_post(post_name)
|
||||
.ok_or_else(|| format!("Post '{}' not found", post_name))?;
|
||||
|
||||
Ok(post.title.to_string())
|
||||
}
|
||||
|
||||
"updated" => {
|
||||
// Insert the last updated time of the current post (or most recent post)
|
||||
let post_ts = if let Some(p) = current_post {
|
||||
|
||||
Reference in New Issue
Block a user