Skip to main content

DEFAULT_SITE_TITLE

Constant DEFAULT_SITE_TITLE 

Source
pub const DEFAULT_SITE_TITLE: &str = "";
Expand description

Default site title for the configuration — deliberately empty.

This value reaches rendered HTML: the taxonomy plugin puts it in site.title, and templates/tera/base.html appends it to every page title as <title>{page} — {site.title}</title>.

It used to be "My SSG Site". A site built without a config file therefore shipped that placeholder as its brand — on sebastienrousseau.com it reached 7,189 generated tag pages, each titled Tag: <term> — My SSG Site, live and indexable. Nothing caught it because the defaults were only ever asserted equal to their own constant; no test asked whether they escaped into output.

Empty is the safe default: base.html guards the suffix with {% if site.title %}, so an unconfigured build now renders <title>{page}</title> and brands nothing. Sites that want a suffix set site_title explicitly, and ssg warns when it falls back to defaults.

See tests/no_placeholder_in_output.rs, which fails if any placeholder constant appears anywhere in a rendered site.