Distinguish attachments, which are non-markdown files that should be served/copied directly, not processed into a template.
This commit is contained in:
@@ -35,6 +35,8 @@ async fn page<'r>(
|
||||
let path_str = path.to_str().unwrap();
|
||||
if let Some(resource_path) = renderer.resolve_to_resource(path_str) {
|
||||
Some(PageResponder::File(NamedFile::open(resource_path).await.unwrap()))
|
||||
} else if let Some(attachment_path) = historian.resolve_to_attachment(path_str) {
|
||||
Some(PageResponder::File(NamedFile::open(attachment_path).await.unwrap()))
|
||||
} else {
|
||||
historian.resolve_to_page(path_str).map(|page| {
|
||||
if let Some(query) = origin.query() {
|
||||
|
||||
Reference in New Issue
Block a user