Configuration
- Go to Settings → Plugins → Dub Links in the Craft control panel.
- On the General tab, enter your Dub API key. You can use an environment variable (e.g.
$DUB_API_KEY). - After saving your API key, the Domain field will suggest your available domains. Pick one, or use an environment variable (e.g.
$DUB_DOMAIN). - In the Sections field, choose which sections to enable short links for. Leave All selected to enable every section that has URLs.
- On the Sidebar tab, choose how the QR code appears in the entry sidebar (None, Icon, or Full), set its style (size, margin, foreground/background colour), and choose whether to Show click count.
Setting enabled sections via environment #
You can override the Sections selection with the DUB_SECTIONS environment variable, a comma-separated list of section handles:
Plain Text
DUB_SECTIONS=festivals,crew
When set, it takes precedence over the control panel selection (which is shown as read-only in the settings).