aboutsummaryrefslogtreecommitdiff
path: root/src/assets.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/assets.rs')
-rw-r--r--src/assets.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/assets.rs b/src/assets.rs
index 2c39d1b..32d26e9 100644
--- a/src/assets.rs
+++ b/src/assets.rs
@@ -11,12 +11,23 @@ pub const BLOG_REGEX: &str = r"(?P<date>[\d]{4}-[\d]{2}-[\d]{2})(?P<title>[a-zA-
#[folder = "content/posts/"]
pub struct PostAsset;
+#[derive(RustEmbed)]
+#[folder = "content/projects/"]
+pub struct ProjectsAsset;
+
#[derive(TemplateOnce)]
#[template(path = "index.html")]
pub struct IndexTemplate {
pub posts: Vec<BlogEntry>,
}
+
+#[derive(TemplateOnce)]
+#[template(path = "projects.html")]
+pub struct ProjectsTemplate {
+ pub content: String,
+}
+
#[derive(TemplateOnce)]
#[template(path = "post.html")]
pub struct PostTemplate {