add trailing slash to the end of post urls
this was intended to have been there from the beginning. oops.
This commit is contained in:
parent
447fb1d6e4
commit
328018834d
|
@ -129,7 +129,13 @@ pub struct Post {
|
|||
|
||||
impl Post {
|
||||
pub fn try_from(value: config::Post, content_renderer: &ContentRenderer) -> Result<Self, SiteError> {
|
||||
let url = format!("/{:04}/{:02}/{:02}/{}", value.date.year(), value.date.month(), value.date.day(), value.slug);
|
||||
let url = format!(
|
||||
"/{:04}/{:02}/{:02}/{}/", //
|
||||
value.date.year(),
|
||||
value.date.month(),
|
||||
value.date.day(),
|
||||
value.slug
|
||||
);
|
||||
let content_html = content_renderer.render(&value.file_path)?;
|
||||
let tags = value.tags.map_or_else(|| Vec::new(), |x| x.clone());
|
||||
Ok(Post {
|
||||
|
|
Loading…
Reference in a new issue