mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-07 23:27:51 +00:00
add description for rss item (just like https://news.ycombinator.com/… (#220)
fix #201
This commit is contained in:
parent
2991813c2d
commit
69c7a69afd
1 changed files with 5 additions and 0 deletions
|
@ -494,6 +494,11 @@ pub async fn rss(req: Request<Body>) -> Result<Response<Body>, String> {
|
||||||
link: Some(utils::get_post_url(&post)),
|
link: Some(utils::get_post_url(&post)),
|
||||||
author: Some(post.author.name),
|
author: Some(post.author.name),
|
||||||
content: Some(rewrite_urls(&post.body)),
|
content: Some(rewrite_urls(&post.body)),
|
||||||
|
description: Some(format!(
|
||||||
|
"<a href='{}{}'>Comments</a>",
|
||||||
|
config::get_setting("REDLIB_FULL_URL").unwrap_or_default(),
|
||||||
|
post.permalink
|
||||||
|
)),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue