aboutsummaryrefslogtreecommitdiff
path: root/src/assets.rs
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2022-06-11 18:15:38 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2022-06-11 18:15:38 +0200
commit6a31a30b98f7febe9ac0db74211ef074aefc7ad3 (patch)
tree9ce8694f0f37efcc5b1eb72d9e2d26731ad7ec6a /src/assets.rs
parent96c2cbe1850f95806cccb6f47a7739eb9c2ac860 (diff)
downloadmacroblog.rs-6a31a30b98f7febe9ac0db74211ef074aefc7ad3.tar.gz
macroblog.rs-6a31a30b98f7febe9ac0db74211ef074aefc7ad3.tar.bz2
macroblog.rs-6a31a30b98f7febe9ac0db74211ef074aefc7ad3.zip
feat: Add project tab
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 {