You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
435 B
Rust
19 lines
435 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
|
pub enum Page {
|
|
Data(PageMetadata),
|
|
Content(String),
|
|
}
|
|
|
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
|
pub struct PageMetadata {
|
|
/// template used to render this page
|
|
pub template: Option<String>,
|
|
|
|
/// remaining data of this page
|
|
/// passed to the templates when rendering
|
|
#[serde(flatten)]
|
|
pub data: toml::Value,
|
|
}
|