pub struct Page {Show 22 fields
pub url: String,
pub title: String,
pub description: Option<String>,
pub date: Option<DateTime<Utc>>,
pub updated: Option<DateTime<Utc>>,
pub draft: bool,
pub lang: String,
pub is_default_lang: bool,
pub canonical_id: String,
pub tags: Vec<String>,
pub categories: Vec<String>,
pub content: String,
pub summary: Option<String>,
pub reading_time: Option<u32>,
pub word_count: Option<u32>,
pub toc: Vec<TocEntry>,
pub custom_js: Vec<String>,
pub custom_css: Vec<String>,
pub aliases: Vec<String>,
pub template: Option<String>,
pub weight: i32,
pub source_path: Option<PathBuf>,
}Expand description
A fully processed page ready for rendering.
Fields§
§url: StringURL path for this page.
title: StringPage title.
description: Option<String>Page description/summary.
date: Option<DateTime<Utc>>Publication date.
updated: Option<DateTime<Utc>>Last updated date.
draft: boolWhether this is a draft.
lang: StringLanguage code for this page.
is_default_lang: boolWhether this is the default language version.
canonical_id: StringCanonical identifier for translation linking (language-neutral).
Tags for this page.
categories: Vec<String>Categories for this page.
content: StringRendered HTML content.
summary: Option<String>Summary/excerpt for listings.
reading_time: Option<u32>Reading time in minutes.
word_count: Option<u32>Word count.
toc: Vec<TocEntry>Table of contents.
custom_js: Vec<String>Custom JavaScript files to include.
custom_css: Vec<String>Custom CSS files to include.
aliases: Vec<String>URL aliases for redirects.
template: Option<String>Template to use for rendering.
weight: i32Sort weight for ordering.
source_path: Option<PathBuf>Source file path.
Implementations§
Source§impl Page
impl Page
Sourcepub fn from_parsed(content: ParsedContent, content_path: &ContentPath) -> Self
pub fn from_parsed(content: ParsedContent, content_path: &ContentPath) -> Self
Create a new page from parsed content and content path.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Page
impl<'de> Deserialize<'de> for Page
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Page
impl RefUnwindSafe for Page
impl Send for Page
impl Sync for Page
impl Unpin for Page
impl UnwindSafe for Page
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more