pub struct FrontMatter {
pub title: Option<String>,
pub description: Option<String>,
pub layout: Option<String>,
pub tags: Vec<String>,
pub sidebar: Option<bool>,
pub sidebar_order: Option<i32>,
pub custom: HashMap<String, NargoValue>,
}Expand description
前置元数据(Front Matter)
Fields§
§title: Option<String>页面标题
description: Option<String>页面描述
layout: Option<String>页面布局
页面标签
是否在侧边栏中隐藏
侧边栏顺序
custom: HashMap<String, NargoValue>自定义元数据
Implementations§
Source§impl FrontMatter
impl FrontMatter
Sourcepub fn with_title(self, title: String) -> Self
pub fn with_title(self, title: String) -> Self
设置标题
Sourcepub fn with_description(self, description: String) -> Self
pub fn with_description(self, description: String) -> Self
设置描述
Sourcepub fn with_layout(self, layout: String) -> Self
pub fn with_layout(self, layout: String) -> Self
设置布局
Trait Implementations§
Source§impl Clone for FrontMatter
impl Clone for FrontMatter
Source§fn clone(&self) -> FrontMatter
fn clone(&self) -> FrontMatter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FrontMatter
impl Debug for FrontMatter
Source§impl Default for FrontMatter
impl Default for FrontMatter
Source§fn default() -> FrontMatter
fn default() -> FrontMatter
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FrontMatter
impl<'de> Deserialize<'de> for FrontMatter
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
Source§impl PartialEq for FrontMatter
impl PartialEq for FrontMatter
Source§impl Serialize for FrontMatter
impl Serialize for FrontMatter
impl StructuralPartialEq for FrontMatter
Auto Trait Implementations§
impl Freeze for FrontMatter
impl RefUnwindSafe for FrontMatter
impl Send for FrontMatter
impl Sync for FrontMatter
impl Unpin for FrontMatter
impl UnsafeUnpin for FrontMatter
impl UnwindSafe for FrontMatter
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