pub struct ListingConfig {
pub name: String,
pub title: Option<String>,
pub per_page: Option<usize>,
pub tag: Option<String>,
pub category: Option<String>,
pub topic: Option<String>,
pub language: Option<String>,
pub after: Option<String>,
pub before: Option<String>,
pub by_year: bool,
}Expand description
One named listing.
Fields§
§name: StringURL segment and directory name: archive → /archive/.
title: Option<String>Heading for the listing. Defaults to name when absent.
per_page: Option<usize>Items per page. Zero or absent means the plugin default.
tag: Option<String>Only pages carrying this tag.
category: Option<String>Only pages carrying this category.
topic: Option<String>Only pages carrying this topic.
language: Option<String>Only pages in this language.
after: Option<String>Only pages dated on or after this (YYYY-MM-DD).
before: Option<String>Only pages dated on or before this (YYYY-MM-DD).
by_year: boolAlso emit /{name}/{year}/ for each year present.
Implementations§
Source§impl ListingConfig
impl ListingConfig
Sourcepub fn display_title(&self) -> &str
pub fn display_title(&self) -> &str
The heading to render, falling back to the name.
Sourcepub const fn is_unfiltered(&self) -> bool
pub const fn is_unfiltered(&self) -> bool
Whether this listing filters at all.
A listing with no filters is every dated page. That is legitimate
— it is how you give /page/N/ a name — but it is worth being
able to say so.
Trait Implementations§
Source§impl Clone for ListingConfig
impl Clone for ListingConfig
Source§fn clone(&self) -> ListingConfig
fn clone(&self) -> ListingConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ListingConfig
impl Debug for ListingConfig
Source§impl Default for ListingConfig
impl Default for ListingConfig
Source§fn default() -> ListingConfig
fn default() -> ListingConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ListingConfig
impl<'de> Deserialize<'de> for ListingConfig
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 ListingConfig
impl RefUnwindSafe for ListingConfig
impl Send for ListingConfig
impl Sync for ListingConfig
impl Unpin for ListingConfig
impl UnsafeUnpin for ListingConfig
impl UnwindSafe for ListingConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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