mirror of https://github.com/docusealco/docuseal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.3 KiB
2.3 KiB
White-Label Developer Reference (Internal)
This file is for Intebec developers only. Do NOT add config schema details, API contracts, or example YAML here. The private config template is managed in the Intebec Dashboard, not in this repo.
Usage in Code
In ERB views
<%= wl.brand_name %>
<%= wl.logo_path %>
<%= wl.support_email %>
<%= wl.page_title(signed_in: true) %>
In Ruby (controllers, mailers, lib)
Whitelabel.brand_name
Whitelabel.website_url
Whitelabel.email_from
Whitelabel.sign_reason("John")
Whitelabel.theme(:primary)
Upstream Merge Strategy
This system is designed to minimise merge conflicts with the upstream DocuSeal repo:
- New files (no conflicts):
lib/whitelabel.rb,config/initializers/whitelabel.rb,app/helpers/whitelabel_helper.rb,config/locales/whitelabel.yml - Patched files (potential conflicts, but isolated changes):
lib/docuseal.rb— only added a comment block; theproduct_namemethod is overridden at runtime- View templates — changes are surgical (replacing one hardcoded string with a
Whitelabel.xxxcall)
- Untouched internal identifiers:
data-theme="docuseal",Docusealmodule name,#docuseal_modal_container,docuseal_clipboardlocalStorage keys — all kept as-is for compatibility
When Upstream Adds New Branded Content
- Check if new views/lib files have hardcoded "DocuSeal" text
- Replace with
Whitelabel.brand_nameorwl.brand_name - If it's an i18n key, add the override to
config/locales/whitelabel.yml
File Reference
| File | Purpose | Upstream risk |
|---|---|---|
lib/whitelabel.rb |
Config loader + licence gate | New file — zero risk |
config/initializers/whitelabel.rb |
Boot-time patching | New file — zero risk |
app/helpers/whitelabel_helper.rb |
View helper | New file — zero risk |
config/locales/whitelabel.yml |
i18n overrides | New file — zero risk |
public/intebec.css |
Theme CSS | Custom file — zero risk |
lib/docuseal.rb |
Added comment | Low risk — comment only |