Fix the links to the blog posts.
This commit is contained in:
@@ -57,6 +57,15 @@ impl Config {
|
||||
self.get_root_directory().join("posts")
|
||||
}
|
||||
|
||||
/// Get the relative path to the folder containing a blog post.
|
||||
///
|
||||
/// This could be appended to the output root directory to get the
|
||||
/// blog post output folder or it could be used to generate a link
|
||||
/// to the blog post.
|
||||
pub(crate) fn get_relative_path_to_post<P: AsRef<Path>>(&self, post_id: P) -> PathBuf {
|
||||
Path::new("posts").join(post_id)
|
||||
}
|
||||
|
||||
pub(crate) fn get_output_directory(&self) -> PathBuf {
|
||||
self.get_root_directory().join("output")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user