Configuration
Plutonium is configured through Plutonium.configure in an initializer. A generated app has this at config/initializers/plutonium.rb:
# config/initializers/plutonium.rb
Plutonium.configure do |config|
config.load_defaults 1.0
# config.shell = :modern
# config.navii_host_url = "https://api.navii.dev"
config.assets.logo = "plutonium.png"
config.assets.favicon = "plutonium.ico"
config.assets.stylesheet = "plutonium.css"
config.assets.script = "plutonium.min.js"
endAccess the live config anywhere via Plutonium.configuration.
Versioned defaults
config.load_defaults 1.0Loads the baseline defaults for a given framework version. Call this first; later versions layer their changes on top. Read the resolved version with config.defaults_version.
Options
| Option | Default | Description |
|---|---|---|
load_defaults(version) | — | Apply versioned framework defaults. Call first. |
development | ENV["PLUTONIUM_DEV"] | Development mode for the framework itself (local assets, hot reload, verbose errors). Query with config.development?. You rarely set this in an app — see Development mode. |
cache_discovery | true outside development env | Cache resource/route discovery. Disable to pick up new resources without a reboot. |
enable_hotreload | true in development env | Hot-reload Plutonium components on change. |
shell | :modern | Chrome style: :modern (topbar + icon rail) or :classic (legacy header + sidebar, only for upgrades). See Layouts. |
navii_host_url | "https://api.navii.dev" | Host of the Navii avatar service used by Avatar. The component appends /avatar/:seed. Repoint to self-host or proxy. |
assets.logo | "plutonium.png" | Brand logo asset. See Assets. |
assets.favicon | "plutonium.ico" | Favicon asset. |
assets.stylesheet | "plutonium.css" | Stylesheet entry. |
assets.script | "plutonium.min.js" | JavaScript entry. |
Development mode
config.development? is driven by the PLUTONIUM_DEV environment variable, not set in the initializer. It’s primarily for working on the Plutonium gem (uses local src/ assets, enables hot reloading, and shows more detailed errors). Applications generally leave it unset.
export PLUTONIUM_DEV=1Assets
Asset entries live under config.assets and point the framework at your compiled stylesheet/script and brand imagery. The pu:core:assets generator wires these up. See Assets for the full asset/Tailwind/Stimulus setup.
Related
- Assets — stylesheet, script, Tailwind, and design tokens
- Layouts — the
shelloption and ejecting chrome - Components › Avatar —
navii_host_url
