pub struct Page {
pub title: String,
pub link_title: String,
pub slug: String,
pub body: String,
pub in_nav: bool,
pub sort_key: u32,
pub is_link: bool,
}Expand description
A page generated from a markdown file in the content root.
Pages follow the same numbering convention as albums:
- Numbered files (
NNN-name.md) appear in navigation, sorted by number - Unnumbered files are generated but hidden from navigation
If the file content is just a URL, the page becomes an external link in nav.
Fields§
§title: StringTitle from first # heading in markdown, or link_title as fallback
link_title: StringDisplay label in nav (filename with number stripped and dashes → spaces)
slug: StringURL slug (filename stem with number prefix stripped)
body: StringRaw markdown content (or URL for link pages)
Whether this page appears in navigation (has number prefix)
sort_key: u32Sort key from number prefix (for ordering)
is_link: boolIf true, body is a URL and this page is an external link
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 UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more