Begin display all posts

This commit is contained in:
Florian RICHER 2023-11-26 18:12:15 +01:00
parent 224b5d4832
commit ce305e1cbf
4 changed files with 85 additions and 112 deletions

View file

@ -1,18 +1,18 @@
#[derive(Debug, Clone)]
#[cfg_attr(feature = "ssr", derive(serde::Serialize, serde::Deserialize))]
use serde::{Deserialize, Serialize};
#[derive(Clone, Serialize, Deserialize, Debug)]
pub struct PostMetadata {
image_path: Option<String>,
title: String,
date: String,
description: String,
project_link: Option<String>,
pub image_path: String,
pub title: String,
pub date: String,
pub description: String,
pub project_link: String,
}
#[derive(Debug, Clone)]
#[cfg_attr(feature = "ssr", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Serialize, Deserialize, Debug)]
pub struct Post {
metadata: PostMetadata,
content: String,
pub metadata: PostMetadata,
pub content: String,
}
cfg_if::cfg_if! {