pub struct WebCfg {Show 24 fields
pub out_dir: Option<String>,
pub base_path: Option<String>,
pub url: Option<String>,
pub description: Option<String>,
pub og_image: Option<String>,
pub canonical: Option<String>,
pub locales: Option<Vec<String>>,
pub default_locale: Option<String>,
pub skin: Option<String>,
pub css: WebCssMode,
pub widgets: WebWidgets,
pub render: WebRender,
pub runtime: Option<bool>,
pub prerender: WebPrerender,
pub hash_assets: Option<bool>,
pub debug_attrs: Option<bool>,
pub menubar: WebMenubar,
pub sitemap: Option<bool>,
pub robots: Option<bool>,
pub host: WebHost,
pub navigation: WebNavigation,
pub seed: BTreeMap<String, WebSeedValue>,
pub pages: BTreeMap<String, WebPageCfg>,
pub ssr: WebSsrCfg,
}Expand description
[web] block - how lumenc web emits the app as a static site.
The rest of lumen.toml still describes the app: [window] title is the
documents’ title, [app] id / entry / locale, [pages],
[asset_roots] and [script] engine all apply. This block covers what
only a site has: where it is served from, what a crawler is told, and
which locales it is emitted in.
[capabilities] does not apply. A desktop build compiles a runtime per
app; a site loads one prebuilt runtime that ships with the toolchain, so
there is nothing per-app to trim.
[web]
out_dir = "dist/web" # where the site is written
base_path = "/" # URL prefix the site is served under
url = "https://example.com" # an address; canonical link + sitemap need one
description = "A Lumen app" # used by any page without its own
locales = ["en-US", "de-DE"] # one tree per locale
host = "netlify" # also write that host's deep-path rewrite file
render = "ssr" # a document per request
runtime = false # and no browser runtime in it
[web.seed]
count = 3 # signal values the pages are rendered with
[web.pages.settings]
title = "Settings"
index = false # and keep it out of a search indexFields§
§out_dir: Option<String>Directory the site is written to, relative to the app dir unless
absolute. Defaults to dist/web.
base_path: Option<String>URL prefix the site is served under, such as / or /docs/. Every
link and asset reference in the documents hangs off it.
url: Option<String>Absolute site URL, such as https://example.com. The canonical link,
the social metadata, the hreflang links and the sitemap need an
address; without this or Self::canonical they are left out.
description: Option<String>Description used by any page that does not set its own.
og_image: Option<String>Image for social previews, relative to the site root or absolute.
canonical: Option<String>Absolute URL the pages declare as canonical, for a site published at
more than one address. Defaults to Self::url.
locales: Option<Vec<String>>Every locale the site is emitted in, one document tree each. Absent emits the default locale alone.
default_locale: Option<String>The locale whose tree sits at the site root; the others sit under
/<tag>/. Defaults to [app] locale, then en-US.
skin: Option<String>Skin the site is styled with. Defaults to [skin] name, then
default. auto is not read here: it means “the machine’s OS”, and
a site is served to every OS.
css: WebCssModeHow the pages are styled.
widgets: WebWidgetsWhich shape a widget the parser built out of smaller elements is emitted as.
render: WebRenderWhere a page’s document comes from.
runtime: Option<bool>Whether the documents carry the browser runtime. Unset takes what
Self::render implies, which is the only thing static and csr
differ about; render = "ssr" is the one that leaves it open.
prerender: WebPrerenderWhere the state the pages are rendered with comes from.
hash_assets: Option<bool>Add a content hash to asset file names, so a cache can hold them forever. A build does not apply this yet.
debug_attrs: Option<bool>Write the extra data-lm-* attributes that name what an element came
from. A build does not write them yet.
What an app menu bar becomes in a document.
sitemap: Option<bool>Write sitemap.xml: every page in every locale, each entry dated and
cross-linked to its other languages. Needs an address to build
absolute URLs from, Self::canonical else Self::url, and is
written whenever the site has one.
robots: Option<bool>Write robots.txt, naming the sitemap. Defaults to on when a sitemap
is written.
host: WebHostHost the site is deployed to, which decides the rewrite file that makes a deep path serve the app instead of the host’s own 404.
How a link to another page of the same site is followed.
seed: BTreeMap<String, WebSeedValue>[web.seed] - signal values every page is rendered with.
pages: BTreeMap<String, WebPageCfg>[web.pages.<key>] - what each page says about itself. A key naming
a page the app does not have is accepted and reaches nothing.
ssr: WebSsrCfg[web.ssr] - what a render of the app may reach, when its pages are
rendered per request.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WebCfg
impl<'de> Deserialize<'de> for WebCfg
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>,
Auto Trait Implementations§
impl Freeze for WebCfg
impl RefUnwindSafe for WebCfg
impl Send for WebCfg
impl Sync for WebCfg
impl Unpin for WebCfg
impl UnsafeUnpin for WebCfg
impl UnwindSafe for WebCfg
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> FromTemplate for T
impl<T> FromTemplate for T
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
§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>
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>
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§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
§impl<T> Template for T
impl<T> Template for T
§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a [Template::Output].§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.